This arose due to internal bug #58087, but this branch fixes the now preschool-aged issue #12 (achievement unlocked; waves to @ayust).
import testify as T
class A(T.TestCase):
@T.class_setup
def first(self):
print "first"
raise Exception
class B(A):
@T.class_setup
def second(self):
print "second"
def test_me(self):
print "this won't run"
if __name__ == '__main__':
T.run()
results in the following output with Testify 0.4.2:
first
second
error: B.test_me
Traceback (most recent call last):
File "/usr/lib/python2.6/contextlib.py", line 16, in __enter__
return self.gen.next()
File "/usr/lib/python2.6/dist-packages/testify/test_case.py", line 371, in wrapper
fixture()
File "test_class_setup_test_case.py", line 9, in first
raise Exception
Exception
With this branch, we instead get:
first
error: B.test_me
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/Users/tyler/Testify/testify/test_fixtures.py", line 73, in wrapper
fixture()
File "tmp.py", line 9, in first
raise Exception
Exception
There are now unit tests pinning down the order in this and a few other exceptional situations.
This arose due to internal bug #58087, but this branch fixes the now preschool-aged issue #12 (achievement unlocked; waves to @ayust).
results in the following output with Testify 0.4.2:
With this branch, we instead get:
There are now unit tests pinning down the order in this and a few other exceptional situations.