mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
fixed stdout alteration in test_distutils
This commit is contained in:
parent
84ee9e257e
commit
9c48da74bc
2 changed files with 6 additions and 1 deletions
|
@ -69,6 +69,7 @@ class BuildPyTestCase(support.TempdirManager,
|
|||
open(os.path.join(testdir, "testfile"), "w").close()
|
||||
|
||||
os.chdir(sources)
|
||||
old_stdout = sys.stdout
|
||||
sys.stdout = StringIO.StringIO()
|
||||
|
||||
try:
|
||||
|
@ -87,7 +88,7 @@ class BuildPyTestCase(support.TempdirManager,
|
|||
finally:
|
||||
# Restore state.
|
||||
os.chdir(cwd)
|
||||
sys.stdout = sys.__stdout__
|
||||
sys.stdout = old_stdout
|
||||
|
||||
def test_dont_write_bytecode(self):
|
||||
# makes sure byte_compile is not used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue