summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45042: Now test classes decorated with `requires_hashdigest` are not ↵Miss Islington (bot)2021-09-041-3/+16
| | | | | | | | skipped (GH-28060) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit dd7b816ac87e468e2fa65ce83c2a03fe1da8503e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-45057: Simplify RegressionTestResult (GH-28081) (GH-28101)Miss Islington (bot)2021-09-011-31/+2
| | | | | | | Remove code which duplicates the functionality of TextTestResult. (cherry picked from commit 2b76a5322fdf71d62b531fd765085f96f981c244) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44852: Support filtering over warnings without a set message (GH-27793)Miss Islington (bot)2021-08-181-4/+5
| | | | | | | | | | | | | Additional improvements: - messages which were compiled regular expressions aren't unpacked back into strings for unmatched warnings; - removed unnecessary "if tokens:" check (there's one before the for loop); - took `endswith` calculation out of the for loop. (cherry picked from commit 8cf07d3db3eed02b43350a5f9dbf68f1c839ea82) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.10] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in ↵Łukasz Langa2021-08-172-0/+41
| | | | | | | regrtest (GH-27634) (GH-27784) (cherry picked from commit a0a6d39295a30434b088f4b66439bf5ea21a3e4e) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-40928: notify users running test_decimal on macOS of malloc warnings ↵Miss Islington (bot)2021-08-061-0/+18
| | | | | | | | | | | (GH-26783) * When trying to allocate very large regions on macOS, malloc does not fail silently. It sends a noisy error out to STDERR * This provides a helper function to warn the user, and provides the warning for test_decimal, which consistently generates these warnings on macOS. Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 15d3c14df32a35ac69898a7852115722e30d7857) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
* bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) ↵Miss Islington (bot)2021-07-262-3/+3
| | | | | | | | (GH-27380) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 11749e2dc20ad6a76e9a39e948853e89b2b4bbed) Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* bpo-44708: Only re-run test methods that match names of previously failing ↵Miss Islington (bot)2021-07-221-1/+14
| | | | | | | | | | | | | | test methods (GH-27287) (GH-27290) * Move to a static argparse.Namespace subclass * Roughly annotate runtest.py * Refactor libregrtest to use lossless test result objects * Only re-run test methods that match names of previously failing test methods * Adopt tests to cover test method name matching Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> (cherry picked from commit f1afef5e0d93d66fbf3c9aaeab8b3b8da9617583) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) ↵Erlend Egeberg Aasland2021-06-231-0/+17
| | | | | | | | | (GH-26885) (cherry picked from commit 4f725261c6cf23d259e8fdc205e12b76ef4d2d31, fbff5387c3e1f3904420fa5a27738c6c5881305b, and 8cec740820fc875117bfa7b6bdb10202ebeb8fd5) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Automerge-Triggered-By: GH:vstinner
* [3.10] bpo-11105: reduce the recursion limit for tests. (GH-26607)Batuhan Taskaya2021-06-081-0/+10
| | | | | (cherry picked from commit e58d762c1fb4ad5e021d016c80c2bc4513632d2f) Co-authored-by: Batuhan Taskaya <batuhan@python.org>
* bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation ↵Lumír 'Frenzy' Balhar2021-04-231-0/+1
| | | | | | | | | | of the PEP) (GH-23142) This change: * merges `distutils.sysconfig` into `sysconfig` while keeping the original functionality and * marks `distutils.sysconfig` as deprecated https://bugs.python.org/issue41282
* bpo-41718: libregrtest avoids importing datetime (GH-24985)Victor Stinner2021-03-231-2/+1
| | | | * libregrtest reimplements datetime.timedelta.__str__() * support.testresult only imports datetime if USE_XML is true.
* bpo-41718: Disable support.testresult XML output by default (GH-24982)Victor Stinner2021-03-231-7/+18
| | | | | | | RegressionTestResult.USE_XML must now be set to True to get the JUnit XML output. Reduce the number of imports when --junit-xml=FILE option is not used: 153 => 144 (-9).
* bpo-42199: Fix bytecode_helper assertNotInBytecode (#23031)Max Bernstein2020-12-181-1/+2
| | | | | | | | | | * bpo-42199: Fix bytecode_helper assertNotInBytecode Add tests. * 📜🤖 Added by blurb_it. Co-authored-by: Dino Viehland <dinoviehland@fb.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-42639: Add script_helper.run_test_script() (GH-23777)Victor Stinner2020-12-151-0/+32
| | | | | | * Add run_test_script() function to test.support.script_helper. * Rename Lib/test/eintrdata/eintr_tester.py to Lib/test/_test_eintr.py. * test_eintr.py uses run_test_script().
* bpo-31904: add shell requirement for test_pipes (GH-23489)pxinwr2020-11-281-1/+1
| | | VxWorks has no user space shell provided so it can't support pipes module. Also add shell requirement for running test_pipes.
* bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)Christian Heimes2020-11-201-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-41521: Rename blacklist parameter to not_exported (GH-21824)Victor Stinner2020-08-171-5/+5
| | | | Rename "blacklist" parameter of test.support.check__all__() to "not_exported".
* bpo-40275: Remove test helpers aliases in test.support (GH-21771)Hai Shi2020-08-081-19/+4
|
* bpo-31904: Fix test_ftplib failures for VxWorks RTOS (GH-19447)pxinwr2020-07-271-0/+2
|
* bpo-36346: Make using the legacy Unicode C API optional (GH-21437)Serhiy Storchaka2020-07-101-0/+8
| | | | Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0 makes the interpreter not using the wchar_t cache and the legacy Unicode C API.
* bpo-41172: Fix check for compiler in test suite (GH-21400)Steve Dower2020-07-091-1/+7
|
* bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵Serhiy Storchaka2020-06-252-11/+12
| | | | characters. (GH-21035)
* bpo-40275: Use new test.support helper submodules in tests (GH-20824)Hai Shi2020-06-251-1/+1
|
* bpo-40275: Use new test.support helper submodules in tests (GH-20849)Hai Shi2020-06-251-1/+1
|
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-201-1/+1
|
* bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984)Victor Stinner2020-06-191-8/+9
| | | | | skip_if_broken_multiprocessing_synchronize() only attempts for create a semaphore on Linux to fix multiprocessing test_resource_tracker_reused() on macOS.
* bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944)Victor Stinner2020-06-181-0/+22
| | | | | | On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module.
* bpo-41009: fix requires_OS_version() class decorator (GH-20942)Christian Heimes2020-06-171-20/+19
| | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-41003: Fix test_copyreg when numpy is installed (GH-20935)Victor Stinner2020-06-171-0/+9
| | | | | | | | Fix test_copyreg when numpy is installed: test.pickletester now saves/restores warnings.filters when importing numpy, to ignore filters installed by numpy. Add the save_restore_warnings_filters() function to the test.support.warnings_helper module.
* bpo-32604: Clean up test.support.interpreters. (gh-20926)Eric Snow2020-06-171-79/+93
| | | | | There were some minor adjustments needed and a few tests were missing. https://bugs.python.org/issue32604
* bpo-40939: Remove the old parser (GH-20768)Pablo Galindo2020-06-111-10/+0
| | | This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation.
* bpo-40275: Move TransientResource to test_urllib2net (GH-20812)Victor Stinner2020-06-111-35/+0
| | | | | | Move TransientResource, time_out, socket_peer_reset and ioerror_peer_reset from test.support to test_urllib2net. Remove "import errno" from test.support.
* bpo-40275: Add warnings_helper submodule in test.support (GH-20797)Hai Shi2020-06-112-174/+186
|
* bpo-40275: test.supports imports lazily fnmatch, glob, struct (GH-20810)Victor Stinner2020-06-111-3/+4
|
* bpo-40275: Add import_helper submodule in test.support (GH-20794)Hai Shi2020-06-102-227/+243
|
* bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779)Victor Stinner2020-06-101-19/+34
| | | | | | | | | | | | test_repl.test_close_stdin() now calls support.suppress_msvcrt_asserts() to fix the test on Windows. * Move suppress_msvcrt_asserts() from test.libregrtest.setup to test.support. Make its verbose parameter optional: verbose=False by default. * Add msvcrt.GetErrorMode(). * SuppressCrashReport now uses GetErrorMode() and SetErrorMode() of the msvcrt module, rather than using ctypes. * Remove also an unused variable (deadline) in wait_process().
* bpo-40275: Add os_helper submodule in test.support (GH-20765)Hai Shi2020-06-102-586/+629
|
* bpo-32604: Recommit "bpo-32604: PEP 554 for use in test suite (GH-19985)" ↵Joannah Nanjekye2020-06-101-0/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-20611) * PEP 554 for use in test suite * 📜🤖 Added by blurb_it. * Fix space * Add doc to doc tree * Move to modules doc tree * Fix suspicious doc errors * Fix test__all * Docs docs docs * Support isolated and fix wait * Fix white space * Remove undefined from __all__ * Fix recv and add exceptions * Remove unused exceptions, fix pep 8 formatting errors and fix _NOT_SET in recv_nowait() * Update Lib/test/support/interpreters.py Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> * Remove documentation (module is for internal use) Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40275: Fix test.support.threading_helper (GH-20488)Victor Stinner2020-05-281-6/+7
| | | | | | | * Add missing sys import * Get verbose and gc_collect() from test.support * Remove unused starttime variable. Issues spotted by pyflakes.
* bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482)Hai Shi2020-05-281-6/+5
| | | Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding().
* bpo-40275: test.support imports subprocess lazily (GH-20471)Victor Stinner2020-05-271-3/+11
| | | | | | | | | | | test.support module now imports the platform and subprocess modules lazily to reduce the number of modules imported by "import test.support". With this change, the threading module is no longer imported indirectly by "import test.support". Use sys.version rather than platform.machine() to detect the Windows ARM32 buildbot.
* bpo-40275: test.support.check_impl_detail() uses sys.implementation (GH-20468)Victor Stinner2020-05-271-1/+1
| | | | | check_impl_detail() of test.support now uses sys.implementation.name, instead of platform.python_implementation().lower(). This change prepares test.support to import the platform module lazily.
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-272-205/+209
|
* Revert "bpo-32604: PEP 554 for use in test suite (GH-19985)" (#20465)Pablo Galindo2020-05-272-328/+0
| | | This reverts commit 9d17cbf33df7cfb67ca0f37f6463ba5c18676641.
* Remove duplicated words words (GH-20413)Serhiy Storchaka2020-05-261-1/+1
|
* bpo-32604: PEP 554 for use in test suite (GH-19985)Joannah Nanjekye2020-05-192-0/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PEP 554 for use in test suite * 📜🤖 Added by blurb_it. * Fix space * Add doc to doc tree * Move to modules doc tree * Fix suspicious doc errors * Fix test__all * Docs docs docs * Support isolated and fix wait * Fix white space * Remove undefined from __all__ * Fix recv and add exceptions * Remove unused exceptions, fix pep 8 formatting errors and fix _NOT_SET in recv_nowait() Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40275: More lazy imports in test.support (GH-20131)Hai Shi2020-05-181-35/+39
| | | | | | | | | | | | | | | | | | | Make the the following imports lazy in test.support: * bz2 * gzip * lzma * resource * zlib The following test.support decorators now need to be called with parenthesis: * @support.requires_bz2 * @support.requires_gzip * @support.requires_lzma * @support.requires_zlib For example, "@requires_zlib" becomes "@requires_zlib()".
* bpo-40275: lazy import modules in test.support (GH-20128)Hai Shi2020-05-161-4/+9
| | | Automerge-Triggered-By: @vstinner
* bpo-40275: test.support imports lazily locale import (GH-19761)Hai Shi2020-05-041-1/+1
|
* bpo-40275: Fix name error in support.socket_helper (GH-19825)Victor Stinner2020-05-011-4/+6
| | | | | Replace TestFailed with support.TestFailed. Bug spotted by pyflakes.