Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
86e741dc
Commit
86e741dc
authored
Jul 26, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go back to using StringIO for XML test reporter in Py2
parent
3d88f519
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
Cython/Tests/xmlrunner.py
Cython/Tests/xmlrunner.py
+7
-3
No files found.
Cython/Tests/xmlrunner.py
View file @
86e741dc
...
...
@@ -44,8 +44,11 @@ import os
import
sys
import
time
from
unittest
import
TestResult
,
_TextTestResult
,
TextTestRunner
from
io
import
StringIO
import
xml.dom.minidom
try
:
from
StringIO
import
StringIO
except
ImportError
:
from
io
import
StringIO
# doesn't accept 'str' in Py2
class
XMLDocument
(
xml
.
dom
.
minidom
.
Document
):
...
...
@@ -332,9 +335,10 @@ class _XMLTestResult(_TextTestResult):
class
XMLTestRunner
(
TextTestRunner
):
"""A test runner class that outputs the results in JUnit like XML files.
"""
def
__init__
(
self
,
output
=
'.'
,
stream
=
sys
.
stderr
,
descriptions
=
True
,
\
verbose
=
False
,
elapsed_times
=
True
):
def
__init__
(
self
,
output
=
'.'
,
stream
=
None
,
descriptions
=
True
,
verbose
=
False
,
elapsed_times
=
True
):
"Create a new instance of XMLTestRunner."
if
stream
is
None
:
stream
=
sys
.
stderr
verbosity
=
(
1
,
2
)[
verbose
]
TextTestRunner
.
__init__
(
self
,
stream
,
descriptions
,
verbosity
)
self
.
output
=
output
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment