Rips out fixture management/discovery into its own file, and moves tests accordingly.
The only test behavior that I modified was in test_order and test_order_with_deprecated_class_level_fixtures_in_derived_class to define the order for method-level fixtures. All other tests pass without issue.
PASSED. 261 tests / 104 cases: 261 passed, 0 failed. (Total test time 4.05s)
The meat of the change involved getting rid of the fixture state tracking we were doing in favor of with blocks. The context manager tells use which fixtures failed, and we can choose to act appropriately. There's a subtlety here, because when we're in the with block we're only aware of setup failures; outside of the block, the yielded list is mutated to include any teardown failures.
I haven't updated documentation/comments yet. I plan to do that soon.
Potentially backwards-incompatible changes
TestCase no longer has self._fixture_methods, self.setup_fixtures, self.class_setup_fixtures, etc... but no one should ever really need to touch those...
I also got rid of TwistedFailureError because it looks like a 4-year-old untested/unused exception.
Resolves #182.
Rips out fixture management/discovery into its own file, and moves tests accordingly.
The only test behavior that I modified was in
test_order
andtest_order_with_deprecated_class_level_fixtures_in_derived_class
to define the order for method-level fixtures. All other tests pass without issue.PASSED. 261 tests / 104 cases: 261 passed, 0 failed. (Total test time 4.05s)
The meat of the change involved getting rid of the fixture state tracking we were doing in favor of
with
blocks. The context manager tells use which fixtures failed, and we can choose to act appropriately. There's a subtlety here, because when we're in thewith
block we're only aware of setup failures; outside of the block, the yielded list is mutated to include any teardown failures.I haven't updated documentation/comments yet. I plan to do that soon.
Potentially backwards-incompatible changes
TestCase
no longer hasself._fixture_methods
,self.setup_fixtures
,self.class_setup_fixtures
, etc... but no one should ever really need to touch those...TwistedFailureError
because it looks like a 4-year-old untested/unused exception.