Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0 test failures #35

Open
0-wiz-0 opened this issue Feb 22, 2017 · 8 comments
Open

3.0.0 test failures #35

0-wiz-0 opened this issue Feb 22, 2017 · 8 comments

Comments

@0-wiz-0
Copy link

0-wiz-0 commented Feb 22, 2017

I see the following test failures on NetBSD-7.99.59/amd64 with python-3.6.0, testtools-2.2.0, mock-2.0.0, extras-1.0.0:

======================================================================
FAIL: test_capture_category (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_category
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 46, in test_capture_category
    self.assertEqual(len(categories), len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 7 != 0


======================================================================
FAIL: test_capture_message (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_message
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 34, in test_capture_message
    self.assertEqual(1, len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0


======================================================================
FAIL: test_capture_reuse (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_reuse
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 27, in test_capture_reuse
    self.assertEqual(1, len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0


======================================================================
FAIL: test_capture_category (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_category
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 46, in test_capture_category
    self.assertEqual(len(categories), len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 7 != 0


======================================================================
FAIL: test_capture_message (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_message
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 34, in test_capture_message
    self.assertEqual(1, len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0


======================================================================
FAIL: test_capture_reuse (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_reuse
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 27, in test_capture_reuse
    self.assertEqual(1, len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0


======================================================================
FAIL: test_capture_category (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_category
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 46, in test_capture_category
    self.assertEqual(len(categories), len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 7 != 0


======================================================================
FAIL: test_capture_message (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_message
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 34, in test_capture_message
    self.assertEqual(1, len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0


======================================================================
FAIL: test_capture_reuse (fixtures.tests._fixtures.test_warnings.TestWarnings)
fixtures.tests._fixtures.test_warnings.TestWarnings.test_capture_reuse
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/scratch/devel/py-fixtures/work/fixtures-3.0.0/fixtures/tests/_fixtures/test_warnings.py", line 27, in test_capture_reuse
    self.assertEqual(1, len(w.captures))
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/pkg/lib/python3.6/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 0


----------------------------------------------------------------------
Ran 894 tests in 16.352s

FAILED (failures=9)
Test failed: <unittest.runner.TextTestResult run=894 errors=0 failures=9>
error: Test failed: <unittest.runner.TextTestResult run=894 errors=0 failures=9>

From the output I can't really recognize what the errors are.

@freeekanayaka
Copy link
Member

Hi,

in #36 I've added Python 3.6 to the Travis targets. Tests are green:

https://travis-ci.org/testing-cabal/fixtures/builds/204259801

so I assume it's a NetBSD-specific issue.

Since I don't think we have testing-cabal developers using NetBSD, I'd say we're not in the position to support it.

However we'll happily accept patches, if there's a way to run the test suite automatically against NetBSD (like Travis does for Linux).

If nobody steps in, I'll close this ticket.

@0-wiz-0
Copy link
Author

0-wiz-0 commented Feb 22, 2017

I'd like to help you debug these, but the errors really tell me nothing. Can you help me how to make this more understandable?
For example, what does this test?

    def test_capture_reuse(self):
        w = fixtures.WarningsCapture()
        with w:
            warnings.warn("test", DeprecationWarning)
            self.assertEqual(1, len(w.captures))
        with w:
            self.assertEqual([], w.captures)

What could be going wrong here?

@freeekanayaka
Copy link
Member

freeekanayaka commented Feb 22, 2017

Sorry to be dry, but the intent of the test looks pretty self-evident to me. If it's not to you, I'd suggest that you familiarize with:

  1. the Fixture class in general
  2. the particular WarningsCapture under test

There's reasonable documentation, code and comments for both.

@0-wiz-0
Copy link
Author

0-wiz-0 commented Feb 22, 2017

Sorry, that's beyond my level of interest in your code.
I'm packaging for pkgsrc, and when I find non-working self-tests I try to report them so upstream can fix them.
Feel free to close the PRs if you're not interested. My guess is it's a combination of the python modules I have vs. what you have installed.

@freeekanayaka
Copy link
Member

I see. Thanks for reporting.

Out of curiosity what's your ultimate motivation/use-case for wanting these Python modules on NetBSD? If I may ask.

@0-wiz-0
Copy link
Author

0-wiz-0 commented Feb 22, 2017

I think I came down to these starting from buildbot. Not sure about the dependency path exactly. tempest-lib and/or os-testr have really many dependencies and stopped my progress for now.

@freeekanayaka
Copy link
Member

So you're ultimately trying to package OpenStack for NetBSD? Or what other goal?

@0-wiz-0
Copy link
Author

0-wiz-0 commented Feb 22, 2017

Getting all of buildbot 0.9.x's dependencies imported so I can run its self-tests. When packaging I also try to run the self-tests of the dependencies. I hope that doesn't mean I'll have to package all of OpenStack :)
buildbot 0.8 is already used for building NetBSD and/or pkgsrc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants