8000 Revert "gh-124842: Fix test.support.import_helper.make_legacy_pyc() (… · pablogsal/cpython@a117765 · GitHub
[go: up one dir, main page]

Skip to content

Commit a117765

Browse files
author
Your Name
committed
Revert "pythongh-124842: Fix test.support.import_helper.make_legacy_pyc() (pythonGH-124843)"
This reverts commit 60ff67d.
1 parent 120729d commit a117765

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/support/import_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def make_legacy_pyc(source):
5858
:return: The file system path to the legacy pyc file.
5959
"""
6060
pyc_file = importlib.util.cache_from_source(source)
61-
assert source.endswith('.py')
62-
legacy_pyc = source + 'c'
61+
up_one = os.path.dirname(os.path.abspath(source))
62+
legacy_pyc = os.path.join(up_one, source + 'c')
6363
shutil.move(pyc_file, legacy_pyc)
6464
return legacy_pyc
6565

0 commit comments

Comments
 (0)
0