summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/support/import_helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/support/import_helper.py b/Lib/test/support/import_helper.py
index edcd2b9..2b91bdc 100644
--- a/Lib/test/support/import_helper.py
+++ b/Lib/test/support/import_helper.py
@@ -58,8 +58,8 @@ def make_legacy_pyc(source):
:return: The file system path to the legacy pyc file.
"""
pyc_file = importlib.util.cache_from_source(source)
- up_one = os.path.dirname(os.path.abspath(source))
- legacy_pyc = os.path.join(up_one, source + 'c')
+ assert source.endswith('.py')
+ legacy_pyc = source + 'c'
shutil.move(pyc_file, legacy_pyc)
return legacy_pyc