test_fixture.TestFixture.test_cleanUp_raise_first_false_callscleanups_returns_exceptions: AssertionError: <traceback object at 0x84d4fa4> is not an instance of NoneType

Bug #693188 reported by Loïc Minier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Fixtures
New
Undecided
Unassigned

Bug Description

Hey

Testsuite fails to pass on Ubuntu:
http://launchpadlibrarian.net/61031457/buildlog_ubuntu-natty-i386.python-fixtures_0.3.5-1build2_FAILEDTOBUILD.txt.gz

======================================================================
FAIL: fixtures.tests.test_fixture.TestFixture.test_cleanUp_raise_first_false_callscleanups_returns_exceptions
----------------------------------------------------------------------
Text attachment: traceback
------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/testtools/runtest.py", line 169, in _run_user
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 499, in _run_test_method
    return self._get_test_method()()
  File "/build/buildd/python-fixtures-0.3.5/lib/fixtures/tests/test_fixture.py", line 76, in test_cleanUp_raise_first_false_callscleanups_returns_exceptions
    self.assertIsInstance(tb, sys.exc_info()[2].__class__)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 307, in assertIsInstance
    self.assertTrue(isinstance(obj, klass), msg)
AssertionError: <traceback object at 0x84d4fa4> is not an instance of NoneType
------------

this seems to be due to testing sys.exc_info() when not in an exception handling context; attaching a proposed patch.

Cheers,

Revision history for this message
Loïc Minier (lool) wrote :
summary: - Testsuite fails
+ test_fixture.TestFixture.test_cleanUp_raise_first_false_callscleanups_returns_exceptions:
+ AssertionError: <traceback object at 0x84d4fa4> is not an instance of
+ NoneType
Revision history for this message
Robert Collins (lifeless) wrote :

Thanks for the patch; gavin put up a merge proposal which I happened to grab first.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.