Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
d89ff759
Commit
d89ff759
authored
13 years ago
by
Tobias Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
remove with statement in xmlrunner
parent
2a295a50
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/base/pymod/xmlrunner.py
+9
-3
9 additions, 3 deletions
modules/base/pymod/xmlrunner.py
with
9 additions
and
3 deletions
modules/base/pymod/xmlrunner.py
+
9
−
3
View file @
d89ff759
...
...
@@ -5,8 +5,6 @@ XML Test Runner for PyUnit
# Written by Sebastian Rittau <srittau@jroger.in-berlin.de> and placed in
# the Public Domain. With contributions by Paolo Borelli and others.
from
__future__
import
with_statement
__version__
=
"
0.1
"
import
os.path
...
...
@@ -184,7 +182,11 @@ class XMLTestRunner(object):
result
=
_XMLTestResult
(
classname
)
start_time
=
time
.
time
()
with
_fake_std_streams
():
try
:
self
.
_orig_stdout
=
sys
.
stdout
self
.
_orig_stderr
=
sys
.
stderr
sys
.
stdout
=
StringIO
()
sys
.
stderr
=
StringIO
()
test
(
result
)
try
:
out_s
=
sys
.
stdout
.
getvalue
()
...
...
@@ -194,6 +196,10 @@ class XMLTestRunner(object):
err_s
=
sys
.
stderr
.
getvalue
()
except
AttributeError
:
err_s
=
""
finally
:
sys
.
stdout
=
self
.
_orig_stdout
sys
.
stderr
=
self
.
_orig_stderr
time_taken
=
time
.
time
()
-
start_time
result
.
print_report
(
stream
,
time_taken
,
out_s
,
err_s
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment