Skip to content

Commit 79621f3

Browse files
ikedamdnozay
authored andcommitted
Pass through arguments for TextTestRunner with **kwargs
* This ensures `XMLTestRunner.__init__` compatible with `TextTestRunner.__init__`.
1 parent a87ba64 commit 79621f3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

xmlrunner/runner.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ class XMLTestRunner(TextTestRunner):
1414
"""
1515
A test runner class that outputs the results in JUnit like XML files.
1616
"""
17-
def __init__(self, output='.', outsuffix=None, stream=sys.stderr,
18-
descriptions=True, verbosity=1, elapsed_times=True,
19-
failfast=False, buffer=False, encoding=UTF8,
20-
resultclass=None):
21-
TextTestRunner.__init__(self, stream, descriptions, verbosity,
22-
failfast=failfast, buffer=buffer)
23-
self.verbosity = verbosity
17+
def __init__(self, output='.', outsuffix=None,
18+
elapsed_times=True, encoding=UTF8,
19+
resultclass=None,
20+
**kwargs):
21+
super(XMLTestRunner, self).__init__(**kwargs)
2422
self.output = output
2523
self.encoding = encoding
2624
# None means default timestamped suffix

0 commit comments

Comments
 (0)