PY-18926: Wrapping AttributeError

Nose has bug: instead of Test we are getting ContextSuite in case of error in setup class. It does not have attribute .test, so we wrap it try / except to mimic previous behavior (pre 5.0) when we simply did not check this field
This commit is contained in:
Ilya.Kazakevich
2016-03-24 23:11:50 +03:00
parent fe36270236
commit 8bb39694b4
3 changed files with 14 additions and 4 deletions
+9 -1
View File
@@ -1,4 +1,4 @@
#from unittest import TestCase
from unittest import TestCase
class TestNose:
def testOne(self):
@@ -9,3 +9,11 @@ class TestNose:
def testThree():
assert 4 == 2*2
class FooTest(TestCase):
@classmethod
def setUpClass(self):
raise ValueError() # or any other bug
def test_test(self):
pass