summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-90473: WASI requires proper open(2) flags (GH-93529)Christian Heimes2022-06-061-1/+4
|
* gh-90473: wasmtime does not support absolute symlinks (GH-93490)Christian Heimes2022-06-051-2/+6
|
* gh-84461: Skip dtrace/network tests that are enabled by -u all (GH-93473)Christian Heimes2022-06-031-0/+2
|
* gh-69443: Add test.support.Py_DEBUG constant (#93226)Victor Stinner2022-05-251-0/+6
|
* gh-90473: WASI: skip gethostname tests (GH-93092)Christian Heimes2022-05-231-0/+3
| | | | | | - WASI's ``gethostname()`` is a stub that always fails with OSError ``ENOTSUP`` - skip mailcap ``test`` if subprocess is not available - WASI process_time clock does not work.
* gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)Christian Heimes2022-05-191-0/+5
|
* gh-90473: Skip tests that don't apply to Emscripten and WASI (GH-92846)Christian Heimes2022-05-161-1/+1
|
* gh-92820: Skip test_cppext if _ctypes is missing (#92844)Victor Stinner2022-05-161-0/+17
| | | Add @test.support.requires_venv_with_pip decorator.
* gh-90473: Increase stack size, disable obmalloc on WASI (GH-92732)Christian Heimes2022-05-131-1/+1
|
* gh-92514: Remove unused test.support.BasicTestRunner (#92515)Jelle Zijlstra2022-05-121-7/+1
|
* gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781)Christian Heimes2022-04-231-6/+1
|
* gh-91156: Use `locale.getencoding()` instead of getpreferredencoding (GH-91732)Inada Naoki2022-04-221-1/+1
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-91217: deprecate nntplib (GH-91543)Brett Cannon2022-04-151-2/+2
|
* bpo-40280: Detect missing threading on WASM platforms (GH-32352)Christian Heimes2022-04-071-1/+14
| | | Co-authored-by: Brett Cannon <brett@python.org>
* bpo-47061: deprecate the `aifc` module (GH-32134)Brett Cannon2022-04-051-0/+8
| | | Co-authored-by: Christian Heimes <christian@python.org>
* bpo-46126: Restore 'descriptions' when running tests internally. (GH-32128)Jason R. Coombs2022-04-031-5/+1
| | | | | This reverts commit a941e5927f7f2540946813606c61c6aea38db426 (GH-30194). Automerge-Triggered-By: GH:jaraco
* bpo-40280: Detect if WASM platform supports threading (GH-32243)Christian Heimes2022-04-021-0/+27
| | | Automerge-Triggered-By: GH:tiran
* Replace with_traceback() with exception chaining and reraising (GH-32074)Oleg Iarygin2022-03-301-1/+1
|
* bpo-40280: Skip socket, fork, subprocess tests on Emscripten (GH-31986)Christian Heimes2022-03-221-0/+16
| | | | | | | | | | | - 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-47037: Don't test for strftime('%4Y') on Windows (GH-31945)Christian Heimes2022-03-181-4/+7
|
* bpo-46587: Skip tests if strftime does not support glibc extension (GH-31873)Christian Heimes2022-03-151-20/+25
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-46198: rename duplicate tests and remove unused code (GH-30297)Nikita Sobolev2022-03-101-3/+3
|
* bpo-40280: Skip more tests/features that don't apply to Emscripten (GH-31791)Christian Heimes2022-03-101-1/+1
| | | | | | | - fd inheritance can't be modified because Emscripten doesn't support subprocesses anyway. - setpriority always fails - geteuid no longer causes problems with latest emsdk - umask is a stub - geteuid / getuid always return 0, but process cannot chown to random uid.
* bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)Christian Heimes2022-03-081-2/+2
| | | | | | | | | - getgroups always fails. - geteuid and getegid always return 0 (root), which confuse tarfile and tests. - hardlinks (link, linkat) always fails. - non-encodable file names are not supported by NODERAWFS layer. - mark more tests with dependency on subprocess and multiprocessing. Mocking does not work if the module fails to import.
* bpo-46678: Fix Invalid cross device link in ↵Jason Wilkes2022-02-081-1/+2
| | | | | | | Lib/test/support/import_helper.py (GH-31204) In [Lib/test/support/import_helper.py](https://github.com/python/cpython/blob/master/Lib/test/support/import_helper.py), the function `make_legacy_pyc` makes a call to `os.rename` which can fail when the source and target live on different devices. This happens (for example) when `PYTHONPYCACHEPREFIX` is set to a directory anywhere on disk, while a ramdisk is mounted on `/tmp` (the latter of which is the default on various Linux distros). Replacing `os.rename` with `shutil.move` fixes this. Automerge-Triggered-By: GH:brettcannon
* bpo-46659: test.support avoids locale.getdefaultlocale() (GH-31167)Victor Stinner2022-02-061-1/+1
| | | | | skip_if_buggy_ucrt_strfptime() of test.support now uses locale.getpreferredencoding(False) instead of locale.getdefaultlocale() to get the Windows code page.
* bpo-40280: Address more test failures on Emscripten (GH-31050)Christian Heimes2022-02-052-1/+3
| | | Co-authored-by: Brett Cannon <brett@python.org>
* bpo-45629: Improve test.support.skip_if_buildbot (GH-31094)Gregory P. Smith2022-02-031-4/+6
| | | | | | | It was added as part of #29222 to avoid running freeze tool tests on the buildbots but the logic was wrong so it did not skip tests on typical posix setup buildbots where the worker is launched from cron via an @reboot task and thus have no USER environment variable. This uses the canonical `getpass.getuser()` API rather than rolling its own attempt.
* Add skips to crashing tests under sanitizers instead of manually skipping ↵Pablo Galindo Salgado2022-01-251-6/+11
| | | | them (GH-30897)
* Refactor sanitiser skip tests into test.support (GH-30889)Pablo Galindo Salgado2022-01-251-1/+30
| | | | | | | * Refactor sanitizer skip tests into test.support * fixup! Refactor sanitizer skip tests into test.support * fixup! fixup! Refactor sanitizer skip tests into test.support
* bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615)Christian Heimes2022-01-252-4/+21
|
* bpo-46126: Disable 'descriptions' when running tests internally. (GH-30194)Jason R. Coombs2022-01-221-1/+5
|
* bpo-46426: Improve tests for the dir_fd argument (GH-30668)Serhiy Storchaka2022-01-211-0/+11
| | | | | | | Ensure that directory file descriptors refer to directories different from the current directory, and that src_dir_fd and dst_dir_fd refer to different directories. Add context manager open_dir_fd() in test.support.os_helper.
* bpo-40280: Add requires_fork test helper (GH-30622)Christian Heimes2022-01-161-2/+12
|
* Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" ↵Victor Stinner2021-12-073-1704/+0
| | | | | (GH-29951) This reverts commit 9bf2cbc4c498812e14f20d86acb61c53928a5a57.
* bpo-45954: Rename PyConfig.no_debug_ranges to code_debug_ranges (GH-29886)Victor Stinner2021-12-021-1/+1
| | | | | | | Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges and invert the value. Document -X no_debug_ranges and PYTHONNODEBUGRANGES env var in PyConfig.code_debug_ranges documentation.
* bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)Victor Stinner2021-11-153-0/+1704
| | | | | | | | | | | | | | | | Remove the asyncore and asynchat modules, deprecated in Python 3.6: use the asyncio module instead. Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd module can be used instead, it is based on asyncio. * Remove asyncore, asynchat and smtpd documentation * Remove test_asyncore, test_asynchat and test_smtpd * Rename Lib/asynchat.py to Lib/test/support/_asynchat.py * Rename Lib/asyncore.py to Lib/test/support/_asyncore.py * Rename Lib/smtpd.py to Lib/test/support/_smtpd.py * Remove DeprecationWarning from private _asyncore, _asynchat and _smtpd modules * _smtpd: remove deprecated properties
* bpo-45668: Fix PGO tests without test extensions (GH-29315)Christian Heimes2021-11-011-2/+8
|
* bpo-45629: Add a test for the "freeze" tool. (gh-29222)Eric Snow2021-10-281-0/+11
| | | | | | | 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
* bpo-45410: regrtest -W leaves stdout/err FD unchanged (GH-28915)Victor Stinner2021-10-131-3/+5
| | | | | | | | | | | | support.print_warning() now stores the original value of sys.__stderr__ and uses it to log warnings. libregrtest uses the same stream to log unraisable exceptions and uncaught threading exceptions. Partially revert commit dbe213de7ef28712bbfdb9d94a33abb9c33ef0c2: libregrtest no longer replaces sys.__stdout__, sys.__stderr__, and stdout and stderr file descriptors. Remove also a few unused imports in libregrtest.
* bpo-45410: Enhance libregrtest -W/--verbose3 option (GH-28908)Victor Stinner2021-10-121-1/+3
| | | | | | | | | | | libregrtest -W/--verbose3 now also replace sys.__stdout__, sys.__stderr__, and stdout and stderr file descriptors (fd 1 and fd 2). support.print_warning() messages are now logged in the expected order. The "./python -m test test_eintr -W" command no longer logs into stdout if the test pass.
* bpo-45410: Add test.support.flush_std_streams() (GH-28885)Victor Stinner2021-10-111-0/+9
| | | support.print_warning() now flushs sys.stdout.
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-061-1/+1
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654)Serhiy Storchaka2021-09-301-43/+24
| | | | | | | | | | | | * Work correctly if an additional fresh module imports other additional fresh module which imports a blocked module. * Raises ImportError if the specified module cannot be imported while all additional fresh modules are successfully imported. * Support blocking packages. * Always restore the import state of fresh and blocked modules and their submodules. * Fix test_decimal and test_xml_etree which depended on an undesired side effect of import_fresh_module().
* [codemod] Fix non-matching bracket pairs (GH-28473)Mohamad Mansour2021-09-211-2/+2
| | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45229: Remove test_main in many tests (GH-28405)Serhiy Storchaka2021-09-191-8/+2
| | | | | | | | | Instead of explicitly enumerate test classes for run_unittest() use the unittest ability to discover tests. This also makes these tests discoverable and runnable with unittest. load_tests() can be used for dynamic generating tests and adding doctests. setUpModule(), tearDownModule() and addModuleCleanup() can be used for running code before and after all module tests.
* bpo-45020: Freeze os, site, and codecs. (gh-28398)Eric Snow2021-09-171-9/+9
| | | https://bugs.python.org/issue45020
* bpo-45020: Add -X frozen_modules=[on|off] to explicitly control use of ↵Eric Snow2021-09-142-3/+35
| | | | | | | frozen modules. (gh-28320) Currently we freeze several modules into the runtime. For each of these modules it is essential to bootstrapping the runtime that they be frozen. Any other stdlib module that we later freeze into the runtime is not essential. We can just as well import from the .py file. This PR lets users explicitly choose which should be used, with the new "-X frozen_modules=[on|off]" CLI flag. The default is "off" for now. https://bugs.python.org/issue45020
* bpo-5846: Do not use obsolete unittest functions. (GH-28303)Serhiy Storchaka2021-09-132-3/+4
| | | | Get rid of use of makeSuite() and findTestCases(). Also make test_math and test_threading_local discoverable.
* bpo-45042: Now test classes decorated with `requires_hashdigest` are not ↵Nikita Sobolev2021-09-041-3/+16
| | | | | | skipped (GH-28060) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>