8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 120729d commit a117765Copy full SHA for a117765
Lib/test/support/import_helper.py
@@ -58,8 +58,8 @@ def make_legacy_pyc(source):
58
:return: The file system path to the legacy pyc file.
59
"""
60
pyc_file = importlib.util.cache_from_source(source)
61
- assert source.endswith('.py')
62
- legacy_pyc = source + 'c'
+ up_one = os.path.dirname(os.path.abspath(source))
+ legacy_pyc = os.path.join(up_one, source + 'c')
63
shutil.move(pyc_file, legacy_pyc)
64
return legacy_pyc
65
0 commit comments