File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 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):
5050 JUnitSchema .assertValid (document )
5151
5252
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+
5367class DoctestTest (unittest .TestCase ):
5468
5569 def test_doctest_example (self ):
Original file line number Diff line number Diff line change @@ -271,8 +271,8 @@ def startTest(self, test):
271271 # Handle partial and partialmethod objects.
272272 test_method = getattr (test_method , 'func' , test_method )
273273 _ , 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.
276276 pass
277277
278278 if self .showAll :
You can’t perform that action at this time.
0 commit comments