The new load_tests doesn't seem to work as intended (on at least precise and xenial). If I break at the end and inspect result:
(Pdb) p result
<testresources.OptimisingTestSuite tests=[<unittest2.suite.TestSuite tests=[<unittest2.suite.TestSuite tests=[<txlongpoll.tests.test_client.AMQClosingTest.test_catch_closed [...]
It's an OptimisingTestSuite wrapping a whole lot of normal TestSuites, so the fixture is restarted for each test, and the newly un-neutered tearDown fails.
Overriding loader.suiteClass works, but I wonder if there is a better way.
The new load_tests doesn't seem to work as intended (on at least precise and xenial). If I break at the end and inspect result:
(Pdb) p result OptimisingTestS uite tests=[ <unittest2. suite.TestSuite tests=[ <unittest2. suite.TestSuite tests=[ <txlongpoll. tests.test_ client. AMQClosingTest. test_catch_ closed [...]
<testresources.
It's an OptimisingTestSuite wrapping a whole lot of normal TestSuites, so the fixture is restarted for each test, and the newly un-neutered tearDown fails.
Overriding loader.suiteClass works, but I wonder if there is a better way.