diff options
Diffstat (limited to 'Lib/test/support/import_helper.py')
-rw-r--r-- | Lib/test/support/import_helper.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/support/import_helper.py b/Lib/test/support/import_helper.py index 9bce2989524..5201dc84cf6 100644 --- a/Lib/test/support/import_helper.py +++ b/Lib/test/support/import_helper.py @@ -3,6 +3,7 @@ import _imp import importlib import importlib.util import os +import shutil import sys import unittest import warnings @@ -59,7 +60,7 @@ def make_legacy_pyc(source): 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') - os.rename(pyc_file, legacy_pyc) + shutil.move(pyc_file, legacy_pyc) return legacy_pyc |