[Python-checkins] cpython (merge 3.4 -> default): Merge 3.4.
barry.warsaw
python-checkins at python.org
Tue Dec 2 17:31:52 CET 2014
https://hg.python.org/cpython/rev/0744ceb5c0ed
changeset: 93701:0744ceb5c0ed
parent: 93699:8d6b27837c69
parent: 93700:4e9c495235d9
user: Barry Warsaw <barry at python.org>
date: Tue Dec 02 11:31:10 2014 -0500
summary:
Merge 3.4.
files:
Lib/test/test_py_compile.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -106,9 +106,13 @@
weird_path = os.path.join(self.directory, 'foo.bar.py')
cache_path = importlib.util.cache_from_source(weird_path)
pyc_path = weird_path + 'c'
+ head, tail = os.path.split(cache_path)
+ penultimate_tail = os.path.basename(head)
self.assertEqual(
- '/'.join(cache_path.split('/')[-2:]),
- '__pycache__/foo.bar.{}.pyc'.format(sys.implementation.cache_tag))
+ os.path.join(penultimate_tail, tail),
+ os.path.join(
+ '__pycache__',
+ 'foo.bar.{}.pyc'.format(sys.implementation.cache_tag)))
with open(weird_path, 'w') as file:
file.write('x = 123\n')
py_compile.compile(weird_path)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list