Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2f855555
Commit
2f855555
authored
Nov 12, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #25607: Restore old distutils logging threshold after running tests that
parse command line arguments.
parents
ef2462ea
84023247
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
Lib/distutils/tests/test_core.py
Lib/distutils/tests/test_core.py
+2
-0
Lib/distutils/tests/test_dist.py
Lib/distutils/tests/test_dist.py
+2
-0
Lib/test/test_shutil.py
Lib/test/test_shutil.py
+1
-1
No files found.
Lib/distutils/tests/test_core.py
View file @
2f855555
...
...
@@ -9,6 +9,7 @@ import test.support
from
test.support
import
captured_stdout
,
run_unittest
import
unittest
from
distutils.tests
import
support
from
distutils
import
log
# setup script that uses __file__
setup_using___file__
=
"""
\
...
...
@@ -36,6 +37,7 @@ class CoreTestCase(support.EnvironGuard, unittest.TestCase):
self
.
old_stdout
=
sys
.
stdout
self
.
cleanup_testfn
()
self
.
old_argv
=
sys
.
argv
,
sys
.
argv
[:]
self
.
addCleanup
(
log
.
set_threshold
,
log
.
_global_log
.
threshold
)
def
tearDown
(
self
):
sys
.
stdout
=
self
.
old_stdout
...
...
Lib/distutils/tests/test_dist.py
View file @
2f855555
...
...
@@ -13,6 +13,7 @@ from distutils.cmd import Command
from
test.support
import
TESTFN
,
captured_stdout
,
run_unittest
from
distutils.tests
import
support
from
distutils
import
log
class
test_dist
(
Command
):
...
...
@@ -405,6 +406,7 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
def
test_show_help
(
self
):
# smoke test, just makes sure some help is displayed
self
.
addCleanup
(
log
.
set_threshold
,
log
.
_global_log
.
threshold
)
dist
=
Distribution
()
sys
.
argv
=
[]
dist
.
help
=
1
...
...
Lib/test/test_shutil.py
View file @
2f855555
...
...
@@ -1037,7 +1037,7 @@ class TestShutil(unittest.TestCase):
# now create another tarball using `tar`
tarball2
=
os
.
path
.
join
(
root_dir
,
'archive2.tar'
)
tar_cmd
=
[
'tar'
,
'-cf'
,
'archive2.tar'
,
base_dir
]
with
support
.
change_cwd
(
root_dir
)
,
captured_stdout
()
:
with
support
.
change_cwd
(
root_dir
):
spawn
(
tar_cmd
)
self
.
assertTrue
(
os
.
path
.
isfile
(
tarball2
))
...
...
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