summaryrefslogtreecommitdiffstats
path: root/Doc/library/test.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-101100: Fix class reference in library/test.rst (GH-114769) ↵Miss Islington (bot)2024-01-311-1/+1
| | | | | | | | | | (GH-114793) The text clearly seems to be referencing `TestFuncAcceptsSequencesMixin`, for which no target is available. Name the class properly and suppress the dangling reference. (cherry picked from commit 7a93db44257c0404dc407ff2ddc997f4bb8890ed) Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
* [3.11] gh-101100: Fix various Sphinx warnings for dunder references in the ↵Miss Islington (bot)2023-12-151-1/+2
| | | | | | `library/` directory (GH-113163) (#113184) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.11] gh-101100: Define `test.regrtest` module to fix references ↵Miss Islington (bot)2023-11-251-0/+3
| | | | | | | | | | (GH-112381) (#112391) gh-101100: Define `test.regrtest` module to fix references (GH-112381) Define test.regrtest module to fix references (cherry picked from commit d525d01e2794e7e736527eaa7ee309ca1252f5bd) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.11] gh-111165: Remove documentation for moved functions (GH-111467) ↵Serhiy Storchaka2023-10-291-10/+0
| | | | | (GH-111472) (cherry picked from commit 4d6bdf8aabcc92303041420a96750fbc52c9f213)
* [3.11] [3.12] gh-111165: Move test running code from test.support to ↵Serhiy Storchaka2023-10-251-35/+0
| | | | | | | | libregrtest (GH-111166) (GH-111316) (GH-111318) Remove no longer used functions run_unittest() and run_doctest() from the test.support module. (cherry picked from commit f6a45a03d0e0ef6b00c45a0de9a606b1d23cbd2f) (cherry picked from commit 5c4f9a1c7ed9fddd8c3ce4c1793af07f66f36a6b)
* [3.11] GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` ↵Miss Islington (bot)2023-10-191-1/+1
| | | | | | (GH-110112) (#111076) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.11] Add test.support.busy_retry() (#93770) (#110341)Victor Stinner2023-10-041-0/+45
| | | | | | | Add test.support.busy_retry() (#93770) Add busy_retry() and sleeping_retry() functions to test.support. (cherry picked from commit 7e9eaad864349d2cfd4c9ffc4453aba03b2cbc16)
* [3.11] gh-106909: Use role :const: for referencing module constants ↵Serhiy Storchaka2023-07-211-1/+1
| | | | | (GH-106910) (GH-106957) (cherry picked from commit 4b9948617f91175783609769aa6160e5b49b9ccc)
* [3.11] gh-106892: Use roles :data: and :const: for referencing module ↵Serhiy Storchaka2023-07-211-1/+1
| | | | | variables (GH-106894) (GH-106955) (cherry picked from commit d036db728ea3d54509cbad06df74e2d9a31fbec8)
* gh-103109: Document ignore_warnings() test support helper (GH-103110)Miss Islington (bot)2023-04-021-0/+15
| | | | | | (cherry picked from commit 32937d6aa414ec7db5c63ef277f21db1880b3af4) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Fix capitalization of Unix in documentation (GH-96913)Miss Islington (bot)2022-10-011-1/+1
| | | | | (cherry picked from commit bd7d0e875e6955dd69cde18a034e59a75b8b4d00) Co-authored-by: Will Hawkins <8715530+hawkinsw@users.noreply.github.com>
* [3.11] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96500)Gregory P. Smith2022-09-021-0/+10
| | | | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002 Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).
* gh-77024: test.support: Improve documentation (GH-92513)Miss Islington (bot)2022-05-271-42/+68
| | | | | | | | | | | | | This is a rework of GH-5774 on current main. I was a bit more conservative in making changes than the original PR. See @csabella's comments on issue GH-77024 and the discussion on GH-5774 for explanations of several of the changes. Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 8995177030c8b41885ad92b260279b7e622ecaea) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-45410: Add test.support.flush_std_streams() (GH-28885)Victor Stinner2021-10-111-0/+9
| | | support.print_warning() now flushs sys.stdout.
* [doc] Fix typos found using codespell (GH-28744)Christian Clauss2021-10-051-2/+2
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515)Serhiy Storchaka2021-09-221-2/+2
| | | | | | | Replace old names when they refer to actual versions of macOS. Keep historical names in references to older versions. Co-authored-by: Patrick Reader <_@pxeger.com>
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-2/+2
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43988: Fix test.support.check_disallow_instantiation version added ↵Erlend Egeberg Aasland2021-06-241-1/+1
| | | | | (GH-26889) Automerge-Triggered-By: GH:vstinner
* bpo-43988: Document test.support.check_disallow_instantiation() (GH-26394)Erlend Egeberg Aasland2021-05-271-0/+8
|
* [doc] Fix erroneous backslashes in signatures and names (GH-23658)Andre Delfino2020-12-171-2/+2
| | | | | The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch). The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.
* Document that `test.support.bytecode_helper` is new in 3.9 (GH-22618)Saiyang Gou2020-10-151-0/+2
|
* 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-38377: Add support.skip_if_broken_multiprocessing_synchronize() (GH-20944)Victor Stinner2020-06-181-0/+8
| | | | | | 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-40275: Move TransientResource to test_urllib2net (GH-20812)Victor Stinner2020-06-111-9/+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-111-93/+102
|
* bpo-40275: Add import_helper submodule in test.support (GH-20794)Hai Shi2020-06-101-103/+116
|
* bpo-40275: Add os_helper submodule in test.support (GH-20765)Hai Shi2020-06-101-172/+184
|
* bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482)Hai Shi2020-05-281-5/+0
| | | Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding().
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-271-67/+78
|
* bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)Serhiy Storchaka2020-04-291-7/+8
|
* bpo-40275: Avoid importing logging in test.support (GH-19601)Serhiy Storchaka2020-04-251-5/+0
| | | | | Import logging lazily in assertLogs() in unittest. Move TestHandler from test.support to logging_helper.
* bpo-40275: Avoid importing socket in test.support (GH-19603)Serhiy Storchaka2020-04-251-59/+71
| | | | | | * Move socket related functions from test.support to socket_helper. * Import socket, nntplib and urllib.error lazily in transient_internet(). * Remove importing multiprocess.
* bpo-39983: Add test.support.print_warning() (GH-19683)Victor Stinner2020-04-231-0/+9
| | | | | | | Log "Warning -- ..." test warnings into sys.__stderr__ rather than sys.stderr, to ensure to display them even if sys.stderr is captured. test.libregrtest.utils.print_warning() now calls test.support.print_warning().
* bpo-40094: Add test.support.wait_process() (GH-19254)Victor Stinner2020-03-311-0/+15
| | | | | | | | | Moreover, the following tests now check the child process exit code: * test_os.PtyTests * test_mailbox.test_lock_conflict() * test_tempfile.test_process_awareness() * test_uuid.testIssue8621() * multiprocessing resource tracker tests
* bpo-39136: Fixed typos (GH-17720)Gurupad Hegde2019-12-281-1/+1
| | | | | funtion -> function; configuraton -> configuration; defintitions -> definitions; focusses -> focuses; necesarily -> necessarily; follwing -> following; Excape -> Escape,
* bpo-38991: Remove test.support.strip_python_stderr() (GH-17490)Victor Stinner2019-12-081-7/+9
| | | | | test.support: run_python_until_end(), assert_python_ok() and assert_python_failure() functions no longer strip whitespaces from stderr.
* bpo-38614: Add timeout constants to test.support (GH-16964)Victor Stinner2019-10-301-0/+61
| | | | | | | | Add timeout constants to test.support: * LOOPBACK_TIMEOUT * INTERNET_TIMEOUT * SHORT_TIMEOUT * LONG_TIMEOUT
* bpo-18578: Rename and document test.bytecode_helper as ↵Joannah Nanjekye2019-09-121-0/+30
| | | | | test.support.bytecode_helper (GH-15168) Rename and document test.bytecode_helper as test.support.bytecode_helper
* bpo-37648: Fixed minor inconsistency in some __contains__. (GH-14904)Serhiy Storchaka2019-08-041-0/+6
| | | | | The collection's item is now always at the left and the needle is on the right of ==.
* bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. ↵Serhiy Storchaka2019-08-041-0/+17
| | | | | | | | | (GH-14996) There was a discrepancy between the Python and C implementations. Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support to test mixed type comparison.
* bpo-37526: Add support.catch_threading_exception() (GH-14664)Victor Stinner2019-07-091-0/+33
| | | | Context manager catching threading.Thread exception using threading.excepthook.
* bpo-37261: Document sys.unraisablehook corner cases (GH-14059)Victor Stinner2019-06-141-7/+3
| | | | | | | | | | | Document reference cycle and resurrected objects issues in sys.unraisablehook() and threading.excepthook() documentation. Fix test.support.catch_unraisable_exception(): __exit__() no longer ignores unraisable exceptions. Fix test_io test_writer_close_error_on_close(): use a second catch_unraisable_exception() to catch the BufferedWriter unraisable exception.
* bpo-37261: Fix support.catch_unraisable_exception() (GH-14052)Victor Stinner2019-06-131-0/+12
| | | | | The __exit__() method of test.support.catch_unraisable_exception context manager now ignores unraisable exception raised when clearing self.unraisable attribute.
* bpo-36829: Document test.support.catch_unraisable_exception() (GH-13554)Victor Stinner2019-05-241-0/+20
| | | | catch_unraisable_exception() now also removes its 'unraisable' attribute at the context manager exit.
* bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941)Stéphane Wirtel2019-02-221-0/+4
|
* bpo-35798: Add test.support.check_syntax_warning(). (#11895)Serhiy Storchaka2019-02-191-3/+18
| | | | | | | It checks that a SyntaxWarning is raised when compile specified statement, that it is raised only once, that it is converted to a SyntaxError when raised as exception, and that both warning and exception objects have corresponding attributes.
* bpo-35042: Use the :pep: role where a PEP is specified (#10036)Stéphane Wirtel2018-10-261-1/+1
|
* Fix "Python" casing in a few places (GH-9001)Andrés Delfino2018-09-141-1/+1
|
* Spelling fixes to docs, docstrings, and comments (GH-6374)Ville Skyttä2018-04-201-1/+1
|
* Fix duplicating words words. (GH-6296)Serhiy Storchaka2018-03-281-1/+1
| | | Most of them have been added in 3.7.