[Python-checkins] cpython (merge 3.6 -> default): Issue #27322: Merge from 3.6
berker.peksag
python-checkins at python.org
Wed Sep 28 10:37:28 EDT 2016
https://hg.python.org/cpython/rev/a78446a65b1d
changeset: 104134:a78446a65b1d
parent: 104132:6b59551bb4fe
parent: 104133:e53984b87cf0
user: Berker Peksag <berker.peksag at gmail.com>
date: Wed Sep 28 17:39:20 2016 +0300
summary:
Issue #27322: Merge from 3.6
files:
Lib/test/test_compileall.py | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -103,19 +103,8 @@
force=False, quiet=2))
def test_compile_path(self):
- # Exclude Lib/test/ which contains invalid Python files like
- # Lib/test/badsyntax_pep3120.py
- testdir = os.path.realpath(os.path.dirname(__file__))
- if testdir in sys.path:
- self.addCleanup(setattr, sys, 'path', sys.path)
-
- sys.path = list(sys.path)
- try:
- sys.path.remove(testdir)
- except ValueError:
- pass
-
- self.assertTrue(compileall.compile_path(quiet=2))
+ with test.test_importlib.util.import_state(path=[self.directory]):
+ self.assertTrue(compileall.compile_path(quiet=2))
with test.test_importlib.util.import_state(path=[self.directory]):
self.add_bad_source_file()
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list