File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,7 +187,9 @@ def shouldThrow():
187187 self .assertRaises (RuntimeError , shouldThrow )
188188
189189class ContextmanagerAssertionMixin (object ):
190- TEST_EXCEPTION = RuntimeError ("test exception" )
190+
191+ def setUp (self ):
192+ self .TEST_EXCEPTION = RuntimeError ("test exception" )
191193
192194 def assertInWithManagerInvariants (self , mock_manager ):
193195 self .assertTrue (mock_manager .enter_called )
@@ -353,7 +355,7 @@ def testMultipleArgBound(self):
353355 self .assertAfterWithManagerInvariantsNoError (mock_nested )
354356
355357
356- class ExceptionalTestCase (unittest .TestCase , ContextmanagerAssertionMixin ):
358+ class ExceptionalTestCase (ContextmanagerAssertionMixin , unittest .TestCase ):
357359 def testSingleResource (self ):
358360 cm = mock_contextmanager_generator ()
359361 def shouldThrow ():
You can’t perform that action at this time.
0 commit comments