Issue #18702: All skipped tests now reported as skipped.

This commit is contained in:
Serhiy Storchaka 2013-11-03 21:31:38 +02:00
parent 7a07cc90c7
commit 43767638a9
21 changed files with 967 additions and 925 deletions

View file

@ -40,11 +40,10 @@ class CompileallTests(unittest.TestCase):
compare = struct.pack('<4sl', importlib.util.MAGIC_NUMBER, mtime)
return data, compare
@unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()')
def recreation_check(self, metadata):
"""Check that compileall recreates bytecode when the new metadata is
used."""
if not hasattr(os, 'stat'):
return
py_compile.compile(self.source_path)
self.assertEqual(*self.data())
with open(self.bc_path, 'rb') as file: