8000 gh-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/ by vstinner · Pull Request #94049 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/ #94049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update references to tests
  • Loading branch information
vstinner committed Jun 21, 2022
commit c3403e3b32c94f4a2eb88b5aa3a3ec36aa0c7014
4 changes: 2 additions & 2 deletions Mac/BuildScript/scripts/postflight.framework
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ FWK="/Library/Frameworks/Python.framework/Versions/@PYVER@"

"${FWK}/bin/python@PYVER@" -E -s -Wi \
"${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-f -x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
"${FWK}/lib/python${PYVER}"

"${FWK}/bin/python@PYVER@" -E -s -Wi -O \
"${FWK}/lib/python${PYVER}/compileall.py" -q -j0 \
-f -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-f -x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
"${FWK}/lib/python${PYVER}"

"${FWK}/bin/python@PYVER@" -E -s -Wi \
Expand Down
14 changes: 7 additions & 7 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1920,10 +1920,6 @@ LIBSUBDIRS= asyncio \
__phello__
TESTSUBDIRS= distutils/tests \
idlelib/idle_test \
lib2to3/tests \
lib2to3/tests/data \
lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
test test/audiodata \
test/capath test/cjkencodings \
test/data test/decimaltestdata \
Expand Down Expand Up @@ -1985,6 +1981,10 @@ TESTSUBDIRS= distutils/tests \
test/test_importlib/zipdata01 \
test/test_importlib/zipdata02 \
test/test_json \
test/test_lib2to3 \
test/test_lib2to3/data \
test/test_lib2to3/data/fixers \
test/test_lib2to3/data/fixers/myfixes \
test/test_peg_generator \
test/test_tools \
test/test_warnings test/test_warnings/data \
Expand Down Expand Up @@ -2072,17 +2072,17 @@ libinstall: all $(srcdir)/Modules/xxmodule.c
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-j0 -d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
$(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-j0 -d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
$(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-j0 -d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-x 'bad_coding|badsyntax|site-packages|test/test_lib2to3/data' \
$(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
Expand Down
63 changes: 31 additions & 32 deletions PCbuild/lib.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -561,33 +561,6 @@
<Compile Include="lib2to3\pygram.py" />
<Compile Include="lib2to3\pytree.py" />
<Compile Include="lib2to3\refactor.py" />
<Compile Include="lib2to3\tests\data\bom.py" />
<Compile Include="lib2to3\tests\data\crlf.py" />
<Compile Include="lib2to3\tests\data\different_encoding.py" />
<Compile Include="lib2to3\tests\data\false_encoding.py" />
<Compile Include="lib2to3\tests\data\fixers\bad_order.py" />
<Compile Include="lib2to3\tests\data\fixers\myfixes\fix_explicit.py" />
<Compile Include="lib2to3\tests\data\fixers\myfixes\fix_first.py" />
<Compile Include="lib2to3\tests\data\fixers\myfixes\fix_last.py" />
<Compile Include="lib2to3\tests\data\fixers\myfixes\fix_parrot.py" />
<Compile Include="lib2to3\tests\data\fixers\myfixes\fix_preorder.py" />
<Compile Include="lib2to3\tests\data\fixers\myfixes\__init__.py" />
<Compile Include="lib2to3\tests\data\fixers\no_fixer_cls.py" />
<Compile Include="lib2to3\tests\data\fixers\parrot_example.py" />
<Compile Include="lib2to3\tests\data\infinite_recursion.py" />
<Compile Include="lib2to3\tests\data\py2_test_grammar.py" />
<Compile Include="lib2to3\tests\data\py3_test_grammar.py" />
<Compile Include="lib2to3\tests\pytree_idempotency.py" />
<Compile Include="lib2to3\tests\support.py" />
<Compile Include="lib2to3\tests\test_all_fixers.py" />
<Compile Include="lib2to3\tests\test_fixers.py" />
<Compile Include="lib2to3\tests\test_main.py" />
<Compile Include="lib2to3\tests\test_parser.py" />
<Compile Include="lib2to3\tests\test_pytree.py" />
<Compile Include="lib2to3\tests\test_refactor.py" />
<Compile Include="lib2to3\tests\test_util.py" />
<Compile Include="lib2to3\tests\__init__.py" />
<Compile Include="lib2to3\tests\__main__.py" />
<Compile Include="lib2to3\__init__.py" />
<Compile Include="lib2to3\__main__.py" />
<Compile Include="linecache.py" />
Expand Down Expand Up @@ -1157,7 +1130,33 @@
<Compile Include="test\test_keywordonlyarg.py" />
<Compile Include="test\test_kqueue.py" />
<Compile Include="test\test_largefile.py" />
<Compile Include="test\test_lib2to3.py" />
<Compile Include="test\test_lib2to3\data\bom.py" />
<Compile Include="test\test_lib2to3\data\crlf.py" />
<Compile Include="test\test_lib2to3\data\different_encoding.py" />
<Compile Include="test\test_lib2to3\data\false_encoding.py" />
<Compile Include="test\test_lib2to3\data\fixers\bad_order.py" />
<Compile Include="test\test_lib2to3\data\fixers\myfixes\fix_explicit.py" />
<Compile Include="test\test_lib2to3\data\fixers\myfixes\fix_first.py" />
<Compile Include="test\test_lib2to3\data\fixers\myfixes\fix_last.py" />
<Compile Include="test\test_lib2to3\data\fixers\myfixes\fix_parrot.py" />
<Compile Include="test\test_lib2to3\data\fixers\myfixes\fix_preorder.py" />
<Compile Include="test\test_lib2to3\data\fixers\myfixes\__init__.py" />
<Compile Include="test\test_lib2to3\data\fixers\no_fixer_cls.py" />
<Compile Include="test\test_lib2to3\data\fixers\parrot_example.py" />
<Compile Include="test\test_lib2to3\data\infinite_recursion.py" />
<Compile Include="test\test_lib2to3\data\py2_test_grammar.py" />
<Compile Include="test\test_lib2to3\data\py3_test_grammar.py" />
<Compile Include="test\test_lib2to3\pytree_idempotency.py" />
<Compile Include="test\test_lib2to3\support.py" />
<Compile Include="test\test_lib2to3\test_all_fixers.py" />
<Compile Include="test\test_lib2to3\test_fixers.py" />
<Compile Include="test\test_lib2to3\test_main.py" />
<Compile Include="test\test_lib2to3\test_parser.py" />
<Compile Include="test\test_lib2to3\test_pytree.py" />
<Compile Include="test\test_lib2to3\test_refactor.py" />
<Compile Include="test\test_lib2to3\test_util.py" />
<Compile Include="test\test_lib2to3\__init__.py" />
<Compile Include="test\test_lib2to3\__main__.py" />
<Compile Include="test\test_linecache.py" />
<Compile Include="test\test_list.py" />
<Compile Include="test\test_listcomps.py" />
Expand Down Expand Up @@ -1743,10 +1742,6 @@
<Folder Include="lib2to3" />
<Folder Include="lib2to3\fixes" />
<Folder Include="lib2to3\pgen2" />
<Folder Include="lib2to3\tests" />
<Folder Include="lib2to3\tests\data" />
<Folder Include="lib2to3\tests\data\fixers" />
<Folder Include="lib2to3\tests\data\fixers\myfixes" />
<Folder Include="logging" />
<Folder Include="msilib" />
<Folder Include="multiprocessing" />
Expand Down Expand Up @@ -1802,6 +1797,10 @@
<Folder Include="test\test_import\data\package" />
<Folder Include="test\test_import\data\package2" />
<Folder Include="test\test_json" />
<Folder Include="test\test_lib2to3" />
<Folder Include="test\test_lib2to3\data" />
<Folder Include="test\test_lib2to3\data\fixers" />
<Folder Include="test\test_lib2to3\data\fixers\myfixes" />
<Folder Include="test\test_peg_generator" />
<Folder Include="test\test_tools" />
<Folder Include="test\test_unittest" />
Expand Down
2 changes: 1 addition & 1 deletion Tools/peg_generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ time_stdlib: $(CPYTHON) venv
-d $(CPYTHON) \
$(TESTFLAGS) \
--exclude "*/bad*" \
--exclude "*/lib2to3/tests/data/*"
--exclude "*/test/test_lib2to3/data/*"

mypy: regen-metaparser
$(MYPY) # For list of files, see mypy.ini
Expand Down
2 changes: 1 addition & 1 deletion Tools/peg_generator/scripts/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def run_benchmark_stdlib(subcommand):
verbose=False,
excluded_files=[
"*/bad*",
"*/lib2to3/tests/data/*",
"*/test/test_lib2to3/data/*",
],
short=True,
mode=modes[subcommand],
Expand Down
1 change: 0 additions & 1 deletion Tools/scripts/generate_stdlib_module_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
'_xxtestfuzz',
'distutils.tests',
'idlelib.idle_test',
'lib2to3.tests',
'test',
'xxlimited',
'xxlimited_35',
Expand Down
0