summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tools
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-130197: Test pygettext --output option (GH-133041) (GH-133266)Miss Islington (bot)2025-05-091-0/+8
| | | | | (cherry picked from commit e5e51bd7f72639be6548c806cc14ea53995bf1b3) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
* [3.13] gh-130197: Improve test coverage of msgfmt.py (GH-133048) (GH-133255)Tomas R.2025-05-021-12/+113
| | | (cherry picked from commit c73d46076ee0a6f32b472f9dfcf0e4245cc1c462)
* [3.13] gh-131852: Filter out POT-Creation-Date in msgfmt (GH-131880) (GH-132217)Miss Islington (bot)2025-04-072-1/+1
| | | | | | (cherry picked from commit ad6a032cebf59d1668caa7e726aa5da72e1cbb5c) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
* [3.13] gh-130197: pygettext: Test the --escape option (GH-131902) (GH-132032)Tomas R.2025-04-024-14/+142
| | | (cherry picked from commit 87d9983994e9a423e9e0050b1bbee52ebaf84367)
* [3.13] gh-85012: Properly reset msgctxt when compiling messages with msgfmt ↵Serhiy Storchaka2025-03-134-0/+92
| | | | | | | | (GH-130525) (GH-131205) Add also human-readable snapshots for tests. (cherry picked from commit 7ea6e88eb490635518c63c3305c03baf3e151555) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-127488: Add tests for Tools/i18n/msgfmt.py (GH-127540) (GH-130182)Miss Islington (bot)2025-02-165-0/+196
| | | | | (cherry picked from commit 361083b84b0db975058b2d1f50dcbfd36f072caf) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-126807: pygettext: Do not attempt to extract messages from ↵Miss Islington (bot)2024-11-141-5/+28
| | | | | | | | | | | | | | | | | | function definitions. (GH-126808) (GH-126846) Fixes a bug where pygettext would attempt to extract a message from a code like this: def _(x): pass This is because pygettext only looks at one token at a time and '_(x)' looks like a function call. However, since 'x' is not a string literal, it would erroneously issue a warning. (cherry picked from commit 9a456383bed52010b90bd491277ea855626a7bba) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-104400: Add more tests to pygettext (GH-108173) (GH-126361)Miss Islington (bot)2024-11-037-21/+362
| | | | | (cherry picked from commit dcae5cd6abaae4f73e656ebc054f30d3f15ca7b8) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.13] gh-126014: Ignore `__pycache__`-only folders in makefile tests ↵Miss Islington (bot)2024-10-291-1/+4
| | | | | | | | | (GH-126066) (#126109) gh-126014: Ignore `__pycache__`-only folders in makefile tests (GH-126066) (cherry picked from commit aeafaf4cda5bfce44bb054b4c530696901646abe) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
* [3.13] gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is ↵Miss Islington (bot)2024-06-121-3/+4
| | | | | | | | | | | | | | | set (GH-120419) (#120432) gh-120418: Don't assume wheeldata is deleted if `WHEEL_PKG_DIR` is set (GH-120419) Remove wheeldata from both sides of the `assertEqual`, so that we're *actually* ignoring it from the test set. This test is only making assertions about the source tree, no code is being executed that would do anything different based on the value of `WHEEL_PKG_DIR`. (cherry picked from commit 030b452e34bbb0096acacb70a31915b9590c8186) Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
* gh-117711: Only check for 'test/wheeldata' when it's actually used (#117712)Karolina Surma2024-04-111-0/+4
| | | | | | | It's possible to build Python with option `--with-wheel-pkg-dir` pointing to a custom wheel directory. Don't include the directory in the test set if the wheels are used from a different location. Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* gh-116303: Skip test module dependent tests if test modules are unavailable ↵Erlend E. Aasland2024-04-031-0/+1
| | | | (#117341)
* gh-117166: Ignore empty and temporary dirs in `test_makefile` (#117190)Nikita Sobolev2024-03-291-2/+10
|
* gh-115421: Test that our Makefile has all needed test folders (GH-115813)Nikita Sobolev2024-03-071-0/+64
|
* gh-113384: Skip test_freeze for framework builds on macOS (#113390)Ronald Oussoren2023-12-221-0/+2
|
* gh-96954: Use skip_if_missing in test_makeunicodedata (GH-111764)Dennis Sweeney2023-11-061-1/+2
| | | skip_if_missing in test_makeunicodedata
* gh-96954: use a directed acyclic word graph for storing the unicodedata ↵CF Bolz-Tereick2023-11-041-0/+121
| | | | | | | codepoint names (#97906) Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com> Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* gh-103053: Skip test_freeze_simple_script() on PGO build (#109591)Victor Stinner2023-09-201-0/+4
| | | | | | | | | | Skip test_freeze_simple_script() of test_tools.test_freeze if Python is built with "./configure --enable-optimizations", which means with Profile Guided Optimization (PGO): it just makes the test too slow. The freeze tool is tested by many other CIs with other (faster) compiler flags. test.pythoninfo now gets also get_build_info() of test.libregrtests.utils.
* gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265)Nikita Sobolev2023-09-121-1/+1
|
* gh-108416: Mark slow test methods with @requires_resource('cpu') (GH-108421)Serhiy Storchaka2023-09-021-3/+1
| | | | Only mark tests which spend significant system or user time, by itself or in subprocesses.
* test_peg_generator and test_freeze require cpu (#108386)Victor Stinner2023-08-232-6/+3
| | | | | | | | The test_peg_generator and test_tools.test_freeze tests now require the 'cpu' resource. Skip these tests unless the 'cpu' resource is enabled (it is disabled by default). These tests are no longer skipped if Python is built with ASAN or MSAN sanitizer.
* gh-90791: Enable test___all__ on ASAN build (#108286)Victor Stinner2023-08-221-1/+1
| | | | | | | * Only skip modules and tests related to X11 on ASAN builds: run other tests with ASAN. * Use print(flush=True) to see output earlier when it's redirected to a pipe. * Update issue reference: replace bpo-46633 with gh-90791.
* GH-107458: fix test_tools refleak (#107577)Kumar Aditya2023-08-031-11/+5
|
* gh-104780: Remove 2to3 program and lib2to3 module (#104781)Victor Stinner2023-05-231-8/+0
| | | | | | | | | * Remove the Tools/scripts/2to3 script. * Remove the Lib/test/test_lib2to3/ directory. * Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object type. * Makefile and PC/layout/main.py no longer compile lib2to3 grammar files. * Update Makefile for 2to3 removal.
* Remove non-existing tools from Sundry skiplist (#103991)Oleg Iarygin2023-04-291-9/+2
|
* gh-102515: Remove unused imports in the `Lib/` directory (#102516)Alex Waygood2023-03-081-1/+0
|
* gh-95731: Fix module docstring extraction in pygettext (#95732)Jakub Kuczys2022-10-151-0/+20
|
* gh-97669: Fix test_tools reference leak (#98216)Victor Stinner2022-10-121-1/+5
| | | | | | | | test_tools.test_sundry() now uses an unittest mock to prevent the logging module to register a real "atfork" function which kept the logging module dictionary alive. So the logging module can be properly unloaded. Previously, the logging module was loaded before test_sundry(), but it's no longer the case since recent test_tools sub-tests removals.
* gh-97669: Create Tools/patchcheck/ directory (#98186)Victor Stinner2022-10-121-2/+2
| | | | Move patchcheck.py, reindent.py and untabify.py scripts to a new Tools/patchcheck/ directory.
* gh-97669: Remove outdated example scripts (#97675) (#98167)Victor Stinner2022-10-114-253/+2
| | | | | | | | | | | Remove outdated example scripts of the Tools/scripts/ directory: * gprof2html.py * md5sum.py * nm2def.py * pathfix.py * win_add2path.py Remove test_gprof2html, test_md5sum and test_pathfix of test_tools.
* gh-97670: Remove sys.getdxp() and analyze_dxp.py script (#97671)Victor Stinner2022-10-041-8/+1
| | | | | | | Remove the sys.getdxp() function and the Tools/scripts/analyze_dxp.py script. DXP stands for "dynamic execution pairs". They were related to DYNAMIC_EXECUTION_PROFILE and DXPAIRS macros which have been removed in Python 3.11. Python can now be built with "./configure --enable-pystats" to gather statistics on Python opcodes.
* gh-97669: Remove outdated example scripts (#97675)Victor Stinner2022-10-044-506/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove outdated example scripts of the Tools/scripts/ directory. A copy can be found in the old-demos project: https://github.com/gvanrossum/old-demos Removed scripts (39): * byext.py * byteyears.py * cleanfuture.py * copytime.py * crlf.py * db2pickle.py * dutree.doc * dutree.py * find-uname.py * find_recursionlimit.py * finddiv.py * findlinksto.py * findnocoding.py * fixcid.py * fixdiv.py * fixheader.py * fixnotice.py * fixps.py * get-remote-certificate.py * google.py * highlight.py * ifdef.py * import_diagnostics.py * lfcr.py * linktree.py * lll.py * mailerdaemon.py * make_ctype.py * mkreal.py * objgraph.py * pdeps.py * pickle2db.py * pindent.py * pysource.py * reindent-rst.py * rgrep.py * suff.py * texi2html.py * which.py Changes: * Remove test_fixcid, test_lll, test_pdeps and test_pindent of test.test_tools. * Remove get-remote-certificate.py changelog entry, since the script was removed. Note: there is a copy of crlf.py in Lib/test/test_lib2to3/data/.
* gh-84623: Remove unused imports in tests (#93772)Victor Stinner2022-06-133-3/+0
|
* GH-91752: Skip test_freeze_simple_script when zlib is not available (#91758)Abhigyan Bose2022-05-031-1/+1
| | | Fixes GH-91752.
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-0/+4
| | | | | | | | | | | - Add requires_fork and requires_subprocess to more tests - Skip extension import tests if dlopen is not available - Don't assume that _testcapi is a shared extension - Skip a lot of socket tests that don't work on Emscripten - Skip mmap tests, mmap emulation is incomplete - venv does not work yet - Cannot get libc from executable The "entire" test suite is now passing on Emscripten with EMSDK from git head (91 suites are skipped).
* bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632)Victor Stinner2022-03-011-0/+7
| | | | | | | | | | | | Skip tests on ASAN and/or MSAN builds: * multiprocessing tests * test___all__ * test_concurrent_futures * test_decimal * test_peg_generator * test_tools The ASAN job of GitHub Actions no longer excludes these tests.
* bpo-46425: Fix direct invocation of multiple test modules (GH-30666)Nikita Sobolev2022-01-181-1/+1
|
* bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455)Christian Heimes2022-01-131-1/+1
|
* bpo-45783: Preserve file moves and deletions in the tests for the freeze ↵Eric Snow2021-11-231-4/+5
| | | | | | tool. (GH-29527) Use shutil.copytree rather than Git, which might be missing (or configured differently) when testing Python built from a source release.
* bpo-45629: Add a test for the "freeze" tool. (gh-29222)Eric Snow2021-10-281-0/+29
| | | | | | | The "freeze" tool has been part of the repo for a long time. However, it hasn't had any tests in the test suite to guard against regressions. We add such a test here. This is especially important as there has been a lot of change recently related to frozen modules, with more to come. Note that as part of the test we build Python out-of-tree and install it in a temp dir. https://bugs.python.org/issue45629
* Fix EncodingWarning in test_tools. (GH-28846)Inada Naoki2021-10-106-23/+27
|
* bpo-45042: Now test classes decorated with `requires_hashdigest` are not ↵Nikita Sobolev2021-09-041-3/+4
| | | | | | skipped (GH-28060) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-36310: Allow pygettext.py to detect calls to gettext in f-strings. ↵jack11422020-11-091-0/+70
| | | | | | | (GH-19875) Adds support to Tools/i18n/pygettext.py for gettext calls in f-strings. This process is done by parsing the f-strings, processing each value, and flagging the ones which contain a gettext call. Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
* bpo-36876: Fix the C analyzer tool. (GH-22841)Eric Snow2020-10-2320-4314/+0
| | | | | | | The original tool wasn't working right and it was simpler to create a new one, partially re-using some of the old code. At this point the tool runs properly on the master. (Try: ./python Tools/c-analyzer/c-analyzer.py analyze.) It take ~40 seconds on my machine to analyze the full CPython code base. Note that we'll need to iron out some OS-specific stuff (e.g. preprocessor). We're okay though since this tool isn't used yet in our workflow. We will also need to verify the analysis results in detail before activating the check in CI, though I'm pretty sure it's close. https://bugs.python.org/issue36876
* bpo-41521: Replace whitelist/blacklist with allowlist/denylist (GH-21822)Victor Stinner2020-08-111-5/+5
| | | Automerge-Triggered-By: @tiran
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-061-4/+4
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21727)Hai Shi2020-08-046-17/+21
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21151)Hai Shi2020-06-251-2/+3
| | | | | | | | | | | | | Use new test.support helper submodules in tests: * distutils tests * test_buffer * test_compile * test_filecmp * test_fileinput * test_readline * test_smtpnet * test_structmembers * test_tools
* bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵Serhiy Storchaka2020-06-251-3/+5
| | | | characters. (GH-21035)
* bpo-9216: hashlib usedforsecurity fixes (GH-20258)Christian Heimes2020-05-221-0/+2
| | | | | | | | | func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor ``_hashlib.new()``. test_hashlib and test_smtplib handle strict security policy better. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran