diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-10-01 02:45:03 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-10-01 02:45:03 +0300 |
commit | 14f1ef0e03ac9cbb4fbc07e38a1a358691e3b565 (patch) | |
tree | c9fc9bc07a3dd2483bf4dbe845f85b1e1d95d504 | |
parent | c5caf3a5e687fa919422b5dd4ef6140c1d2ff6ce (diff) | |
parent | d8e9713cf1f475ccd5c870a9643d625645870a4c (diff) | |
download | cpython-git-14f1ef0e03ac9cbb4fbc07e38a1a358691e3b565.tar.gz |
Issue #28226: Merge from 3.6
-rw-r--r-- | Lib/test/test_compileall.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py index 30ca3feee4..2356efcaec 100644 --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py @@ -107,8 +107,7 @@ class CompileallTests(unittest.TestCase): # we should also test the output with support.captured_stdout() as stdout: self.assertTrue(compileall.compile_file(pathlib.Path(self.source_path))) - self.assertEqual(stdout.getvalue(), - "Compiling '{}'...\n".format(self.source_path)) + self.assertRegex(stdout.getvalue(), r'Compiling ([^WindowsPath|PosixPath].*)') self.assertTrue(os.path.isfile(self.bc_path)) def test_compile_file_pathlike_ddir(self): @@ -158,7 +157,8 @@ class CompileallTests(unittest.TestCase): self.assertFalse(os.path.isfile(self.bc_path)) with support.captured_stdout() as stdout: compileall.compile_dir(pathlib.Path(self.directory)) - self.assertIn("Listing '{}'...".format(self.directory), stdout.getvalue()) + line = stdout.getvalue().splitlines()[0] + self.assertRegex(line, r'Listing ([^WindowsPath|PosixPath].*)') self.assertTrue(os.path.isfile(self.bc_path)) @mock.patch('compileall.ProcessPoolExecutor') |