File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,20 @@ def validate_junit_report(text):
50
50
JUnitSchema .assertValid (document )
51
51
52
52
53
+ class TestCaseSubclassWithNoSuper (unittest .TestCase ):
54
+ def __init__ (self , description ):
55
+ # no super, see #189
56
+ pass
57
+
58
+ def run (self , result ):
59
+ result = _XMLTestResult ()
60
+ result .startTest (self )
61
+ result .stopTest (self )
62
+
63
+ def test_something (self ):
64
+ pass
65
+
66
+
53
67
class DoctestTest (unittest .TestCase ):
54
68
55
69
def test_doctest_example (self ):
Original file line number Diff line number Diff line change @@ -271,8 +271,8 @@ def startTest(self, test):
271
271
# Handle partial and partialmethod objects.
272
272
test_method = getattr (test_method , 'func' , test_method )
273
273
_ , self .lineno = inspect .getsourcelines (test_method )
274
- except TypeError :
275
- # issue #188, some frameworks can make test method opaque.
274
+ except ( AttributeError , TypeError ) :
275
+ # issue #188, #189, some frameworks can make test method opaque.
276
276
pass
277
277
278
278
if self .showAll :
You can’t perform that action at this time.
0 commit comments