cpython/Lib/test/test_importlib
Gregory P. Smith ce720d3e06
bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-18718)
Fix compileall.compile_dir() ddir= behavior on sub-packages.

Fixes compileall.compile_dir's ddir parameter and compileall command
line flag `-d` to no longer write the wrong pathname to the generated
pyc file for submodules beneath the root of the directory tree being
compiled.  This fixes a regression introduced with Python 3.5.

Tests backported from GH 02673352b5, the
implementation is different due to intervening code changes.  But still
quiet simple.

Why was the bug ever introduced?  The refactoring to add parallel
execution kept the ddir -> dfile computations but discarded the results
instead of sending them to compile_file().  This fixes that.  Lack of tests
meant this went unnoticed.
2020-03-01 10:42:56 -08:00
..
builtin
data
data01
data02
data03
extension
frozen
import_
namespace_pkgs
source
zipdata01
zipdata02
__init__.py
__main__.py
abc.py
fixtures.py
stubs.py
test_abc.py
test_api.py
test_lazy.py
test_locks.py
test_main.py
test_metadata_api.py
test_namespace_pkgs.py
test_open.py
test_path.py
test_read.py
test_resource.py
test_spec.py
test_util.py
test_windows.py
test_zip.py
util.py bpo-39769: Fix compileall ddir for subpkgs. (GH-18676) (GH-18718) 2020-03-01 10:42:56 -08:00