mirror of
https://github.com/python/cpython
synced 2024-09-20 13:21:35 +00:00
bpo-45205: Make test_compileall quiet (GH-28356)
Make test_compileall quiet: test_year_2038_mtime_compilation() and test_larger_than_32_bit_times() of test_compileall no longer log "Compiling ..." messages to stdout.
This commit is contained in:
parent
e08e491a6c
commit
cc057ff522
|
@ -91,6 +91,7 @@ def test_year_2038_mtime_compilation(self):
|
|||
os.utime(self.source_path, (2**32 - 1, 2**32 - 1))
|
||||
except (OverflowError, OSError):
|
||||
self.skipTest("filesystem doesn't support timestamps near 2**32")
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
self.assertTrue(compileall.compile_file(self.source_path))
|
||||
|
||||
def test_larger_than_32_bit_times(self):
|
||||
|
@ -100,6 +101,7 @@ def test_larger_than_32_bit_times(self):
|
|||
os.utime(self.source_path, (2**35, 2**35))
|
||||
except (OverflowError, OSError):
|
||||
self.skipTest("filesystem doesn't support large timestamps")
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
self.assertTrue(compileall.compile_file(self.source_path))
|
||||
|
||||
def recreation_check(self, metadata):
|
||||
|
|
Loading…
Reference in a new issue