-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make compatible with unittest.TestProgram in python3 #167
Make compatible with unittest.TestProgram in python3 #167
Conversation
* Tests will fail on Python3 as the parameters of XMLTestRunner doesn't suffice required parameters by unitttest.TestProgram.
1 similar comment
This meant |
* This ensures `XMLTestRunner.__init__` compatible with `TextTestRunner.__init__`.
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 99.45% 99.46% +<.01%
==========================================
Files 17 17
Lines 1278 1300 +22
==========================================
+ Hits 1271 1293 +22
Misses 7 7
Continue to review full report at Codecov.
|
elapsed_times=True, encoding=UTF8, | ||
resultclass=None, | ||
**kwargs): | ||
super(XMLTestRunner, self).__init__(**kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is caused for that XMLTestRunner
doesn't support warnings
parameter that is added to TextTestRunner
in python3: https://github.com/python/cpython/blob/v3.4.8/Lib/unittest/runner.py#L129
This change receives any unknown parameters and pass them through to TextTestRunner
.
This ensures XMLTestRunner.__init__
is always compatible with TextTestRunner.__init__
and clarifies that XMLTestRunner
itself doesn't handle those parameters.
Replaces #140.
XMLTestRunner
doesn't receive options like-b
via unittest.TestProgram in python3.This is caused for this implementation in
unittest
in python3: https://github.com/python/cpython/blob/v3.4.8/Lib/unittest/main.py#L234XMLTestRunner.__init__
should be compatible withTestTestRunner.__init__
.