Issue 12122: test_runpy failure - Python tracker (original) (raw)
I get the following failures in a fresh checkout:
====================================================================== ERROR: test_explicit_relative_import (test.test_runpy.RunModuleTest)
Traceback (most recent call last): File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 283, in test_explicit_relative_import self._check_relative_imports(depth) File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 257, in _check_relative_imports make_legacy_pyc(mod_fname) File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory
====================================================================== ERROR: test_main_relative_import (test.test_runpy.RunModuleTest)
Traceback (most recent call last): File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 288, in test_main_relative_import self._check_relative_imports(depth, "main") File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 257, in _check_relative_imports make_legacy_pyc(mod_fname) File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory
====================================================================== ERROR: test_run_module (test.test_runpy.RunModuleTest)
Traceback (most recent call last): File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 273, in test_run_module self._check_module(depth) File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 177, in _check_module make_legacy_pyc(mod_fname) File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory
====================================================================== ERROR: test_run_package (test.test_runpy.RunModuleTest)
Traceback (most recent call last): File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 278, in test_run_package self._check_package(depth) File "/home/antoine/t/cpython/Lib/test/test_runpy.py", line 201, in _check_package make_legacy_pyc(mod_fname) File "/home/antoine/t/cpython/Lib/test/support.py", line 217, in make_legacy_pyc os.rename(pyc_file, legacy_pyc) OSError: [Errno 2] No such file or directory
Here is the test output:
test_run_code (test.test_runpy.RunModuleCodeTest) ... ok test_run_module_code (test.test_runpy.RunModuleCodeTest) ... ok test_explicit_relative_import (test.test_runpy.RunModuleTest) ... Testing relative imports at depth: 2 Package tree in: /tmp/tmpmruwyg Updated sys.path: /tmp/tmpmruwyg Next level in: /tmp/tmpmruwyg/runpy_pkg Created: /tmp/tmpmruwyg/runpy_pkg/init.py Next level in: /tmp/tmpmruwyg/runpy_pkg/runpy_pkg Created: /tmp/tmpmruwyg/runpy_pkg/runpy_pkg/init.py Created: /tmp/tmpmruwyg/runpy_pkg/runpy_pkg/runpy_test.py Added sibling module: /tmp/tmpmruwyg/runpy_pkg/runpy_pkg/sibling.py Added uncle package: /tmp/tmpmruwyg/runpy_pkg/uncle Added cousin package: /tmp/tmpmruwyg/runpy_pkg/uncle/cousin Added nephew module: /tmp/tmpmruwyg/runpy_pkg/uncle/cousin/nephew.py Running from source: runpy_pkg.runpy_pkg.runpy_test Removed sys.modules entries Removed sys.path entry Removed package tree ERROR test_invalid_names (test.test_runpy.RunModuleTest) ... ok test_library_module (test.test_runpy.RunModuleTest) ... ok test_main_relative_import (test.test_runpy.RunModuleTest) ... Testing main relative imports at depth: 2 Package tree in: /tmp/tmp39sx5n Updated sys.path: /tmp/tmp39sx5n Next level in: /tmp/tmp39sx5n/runpy_pkg Created: /tmp/tmp39sx5n/runpy_pkg/init.py Next level in: /tmp/tmp39sx5n/runpy_pkg/runpy_pkg Created: /tmp/tmp39sx5n/runpy_pkg/runpy_pkg/init.py Created: /tmp/tmp39sx5n/runpy_pkg/runpy_pkg/runpy_test.py Added sibling module: /tmp/tmp39sx5n/runpy_pkg/runpy_pkg/sibling.py Added uncle package: /tmp/tmp39sx5n/runpy_pkg/uncle Added cousin package: /tmp/tmp39sx5n/runpy_pkg/uncle/cousin Added nephew module: /tmp/tmp39sx5n/runpy_pkg/uncle/cousin/nephew.py Running from source: runpy_pkg.runpy_pkg.runpy_test Removed sys.modules entries Removed sys.path entry Removed package tree ERROR test_run_module (test.test_runpy.RunModuleTest) ... Testing package depth: 0 Package tree in: /tmp/tmpy4y7in Updated sys.path: /tmp/tmpy4y7in Created: /tmp/tmpy4y7in/runpy_test.py Running from source: runpy_test Removed sys.modules entries Removed sys.path entry Removed package tree ERROR test_run_package (test.test_runpy.RunModuleTest) ... Testing package depth: 1 Package tree in: /tmp/tmp_7dx_4 Updated sys.path: /tmp/tmp_7dx_4 Next level in: /tmp/tmp_7dx_4/runpy_pkg Created: /tmp/tmp_7dx_4/runpy_pkg/init.py Created: /tmp/tmp_7dx_4/runpy_pkg/main.py Running from source: runpy_pkg Removed sys.modules entries Removed sys.path entry Removed package tree ERROR test_basic_script (test.test_runpy.RunPathTest) ... ok test_directory (test.test_runpy.RunPathTest) ... ok test_directory_compiled (test.test_runpy.RunPathTest) ... ok test_directory_error (test.test_runpy.RunPathTest) ... ok test_main_recursion_error (test.test_runpy.RunPathTest) ... ok test_script_compiled (test.test_runpy.RunPathTest) ... ok test_zipfile (test.test_runpy.RunPathTest) ... ok test_zipfile_compiled (test.test_runpy.RunPathTest) ... ok test_zipfile_error (test.test_runpy.RunPathTest) ... ok