reapplied r74493 (after #6665 fix has been backported)

This commit is contained in:
Tarek Ziadé 2009-11-01 23:11:55 +00:00
parent ec416617e8
commit 628b41f2bd
3 changed files with 12 additions and 9 deletions

View file

@ -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 = io.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