summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] docs: module page titles should not start with a link to themselves ↵Miss Islington (bot)2024-05-081-2/+2
| | | | | | | | (GH-117099) (#118791) docs: module page titles should not start with a link to themselves (GH-117099) (cherry picked from commit bcb435ee8ff41b5ec5d879ee0b6651f146a66151) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.12] gh-59215: unittest: restore _top_level_dir at end of discovery ↵Miss Islington (bot)2024-04-231-5/+10
| | | | | | | | | | (GH-15242) (GH-117508) * gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242) (cherry picked from commit fc5f68e58ecfbc8c452e1c2f33a2a53d3f2d7ea2) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] Docs: align usage of versionadded/versionchanged with recommended ↵Erlend E. Aasland2024-01-231-2/+2
| | | | | | | | practice (#114409) (#114472) (cherry picked from commit 1d7bddd9612bcbaaedbc837e2936de773e855411) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* [3.12] GH-113661: unittest runner: Don't exit 5 if tests were skipped ↵Miss Islington (bot)2024-01-091-1/+1
| | | | | | | | | | | | (GH-113856) (#113875) GH-113661: unittest runner: Don't exit 5 if tests were skipped (GH-113856) The intention of exiting 5 was to detect issues where the test suite wasn't discovered at all. If we skipped tests, it was correctly discovered. (cherry picked from commit 3a9096c337c16c9335e0d4eba8d1d4196258af72) Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
* [3.12] gh-112890: `unittest` Test Discovery page updated "`unittest` dropped ↵Miss Islington (bot)2023-12-171-2/+2
| | | | | | | the namspace packages support" (GH-113195) (GH-113228) (cherry picked from commit 21d52995ea490328edf9be3ba072821cd445dd30) Co-authored-by: Taylor Packard <3.t.packard@gmail.com>
* [3.12] gh-101100: Fix various Sphinx warnings for dunder references in the ↵Miss Islington (bot)2023-12-151-2/+2
| | | | | | `library/` directory (GH-113163) (#113183) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100: Fix Sphinx warning in references with asterisks ↵Miss Islington (bot)2023-12-131-7/+7
| | | | | | | | | (GH-113029) (#113043) gh-101100: Fix Sphinx warning in references with asterisks (GH-113029) (cherry picked from commit 3531ea441b8b76bff90d2ecc062335da65fd3341) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-101100 : Fix Sphinx warnings in `library/doctest.rst` (GH-112399) ↵Miss Islington (bot)2023-11-251-0/+2
| | | | | | | (#112402) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292) ↵Adam Turner2023-10-031-10/+10
| | | | | | (#110302) [3.12] Docs: Avoid the deprecated ``.. cmdoption::`` directive (GH-110292). (cherry picked from commit 77e9aae3837d9f0cf87461d023896f2c4aeb282f)
* [3.12] gh-108669: unittest: Fix documentation for ↵Miss Islington (bot)2023-08-301-1/+1
| | | | | | | | TestResult.collectedDurations (GH-108670) (#108672) gh-108669: unittest: Fix documentation for TestResult.collectedDurations (GH-108670) (cherry picked from commit 6c484c39beeb66d40ef0a73cc4f1e900ea498cfa) Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
* [3.12] gh-106892: Use roles :data: and :const: for referencing module ↵Serhiy Storchaka2023-07-211-2/+2
| | | | | variables (GH-106894) (GH-106954) (cherry picked from commit d036db728ea3d54509cbad06df74e2d9a31fbec8)
* GH-103484: Fix redirected permanently URLs (#104001)Rafael Fontenelle2023-05-021-1/+1
| | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
* gh-62432: unittest runner: Exit code 5 if no tests were run (#102051)Stefano Rivera2023-04-271-1/+2
| | | | | | | | As discussed in https://discuss.python.org/t/unittest-fail-if-zero-tests-were-discovered/21498/7 It is common for test runner misconfiguration to fail to find any tests, This should be an error. Fixes: #62432
* gh-48330: address review comments to PR-12271 (#103209)Giampaolo Rodola2023-04-161-4/+0
| | | | | address review comments to PR-12271 Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* bpo-4080: unittest durations (#12271)Giampaolo Rodola2023-04-021-6/+36
|
* gh-100824: Fix typo in the documentation of ↵busywhitespace2023-01-081-2/+2
| | | | unittest.TestLoader.testNamePatterns (#100825)
* Fix typo in unittest docs (#97742)annonm2022-10-031-1/+1
|
* Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example ↵Alexandru Mărășteanu2022-07-221-2/+2
| | | | (GH-95134)
* Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" ↵Serhiy Storchaka2022-06-261-48/+7
| | | | | | (GH-92556) This reverts commit b50322d20337ca468f2070eedb051a16ee1eba94.
* Fix typo in unittest.rst: addCleanupModule -> addModuleCleanup (GH-92631)Mikhail Terekhov2022-05-111-1/+1
|
* bpo-45046: Support context managers in unittest (GH-28045)Serhiy Storchaka2022-05-081-0/+42
| | | | | | Add methods enterContext() and enterClassContext() in TestCase. Add method enterAsyncContext() in IsolatedAsyncioTestCase. Add function enterModuleContext().
* bpo-14265: Adds fully qualified test name to unittest output (GH-32138)Sam Ezeh2022-03-291-14/+20
| | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-45162: Revert "Remove many old deprecated unittest features" (GH-30935)Gregory P. Smith2022-01-271-7/+48
| | | | | | | | | | Revert "bpo-45162: Remove many old deprecated unittest features (GH-28268)" This reverts commit b0a6ede3d0bd6fa4ffe413ab4dfc1059201df25b. We're deferring this change until 3.12 while upstream projects that use the legacy assertion method names are fixed. See the issue for links to the discussion. Many upstream projects now have issues and PRs filed.
* bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745)Inada Naoki2022-01-101-2/+23
|
* bpo-46178: Remove/rename redundant Travis CI code (#30309)Hugo van Kemenade2021-12-311-2/+3
|
* [docs] Add missing word "any" in unittest -k cmdline option description ↵ch33zer2021-11-171-1/+1
| | | | (GH-29571)
* bpo-45162: Remove many old deprecated unittest features (GH-28268)Serhiy Storchaka2021-09-171-48/+7
| | | | | | | * "fail*" and "assert*" aliases of TestCase methods. * Broken from start TestCase method assertDictContainsSubset(). * Ignored TestLoader.loadTestsFromModule() parameter use_load_tests. * Old alias _TextTestResult of TextTestResult.
* bpo-41322: Add unit tests for deprecation of test return values (GH-27846)andrei kulakov2021-08-221-0/+4
| | | | Also fix the traceback of warnings.
* bpo-10548: expectedFailure does not apply to fixtures (#23201)Irit Katriel2021-05-111-2/+3
|
* bpo-43954: Fix a missing word in the unittest docs (GH-25672)Zackery Spytz2021-04-301-2/+3
|
* bpo-23882: Doc: Clarify unittest discovery document (GH-21560)Inada Naoki2021-02-221-6/+12
| | | | | | | | Unittest discovery support namespace package as start directory. But it doesn't find namespace package in the start directory automatically. Otherwise, unittest discovery search into unexpected directories like `vendor/` or `node_modules/`.
* Fix typos in unittest documentation (GH-24194)Conchylicultor2021-01-201-3/+3
| | | | * addCleanupClass -> addClassCleanup * doCleanupsClass -> doClassCleanups
* bpo-42391: Clarify documentation of TestCase.assertIs (GH-23348)Ram Rachum2020-11-221-2/+1
| | | Removing 'evaluate' makes it more consistent with other assertX entries.
* bpo-38320: Clarify that expectedFailure is satisfied by either failure or ↵Irit Katriel2020-10-191-5/+6
| | | | error of the test. (GH-22740)
* bpo-41898: add caveat on root logger seeing all messages in assertLogs doc ↵Irit Katriel2020-10-041-1/+2
| | | | (GH-22526)
* bpo-41328: Replace mention of Hudson CI with Travis CI and AppVeyor (GH-21653)Dmytro Litvinov2020-07-281-1/+1
|
* bpo-39385: Add an assertNoLogs context manager to unittest.TestCase (GH-18067)Kit Choi2020-07-011-0/+21
| | | Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
* Fix parameter names in assertIn() docs (GH-18829)Christoph Zwerschke2020-04-171-3/+3
| | | The names "member" and "container" for the arguments are also used in the module and shown with the help() function, and are immediately understandable in this context, contrary to "first" and "second".
* Add missing comma and period in unittest docs (GH-17211)Jules Lasne (jlasne)2019-11-191-1/+1
| | | Automerge-Triggered-By: @csabella
* Remove doc reference to unmaitained Nose package (GH-16849)Jon Dufresne2019-10-191-2/+2
| | | The Nose package is no longer maintained.
* bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878)Xtreak2019-09-111-0/+76
| | | | | | | | | | | * Document `unittest.IsolatedAsyncioTestCase` API * Add a simple example with respect to order of evaluation of setup and teardown calls. https://bugs.python.org/issue32972 Automerge-Triggered-By: @asvetlov
* [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)Serhiy Storchaka2019-06-051-1/+1
| | | Turn deprecation warnings added in 3.8 into TypeError.
* bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)Serhiy Storchaka2019-06-011-2/+2
|
* bpo-37094: Add example for TestCase.skipTest in unittest doc (GH-13645)Makdon2019-05-311-4/+12
| | | | | | Also includes other minor test skipping doc improvements. https://bugs.python.org/issue37094
* Fixed capital letters missing and missing . (GH-12584)Jules Lasne (jlasne)2019-03-281-6/+6
| | | No `bpo` for minor doc fix
* Doc: Missing backquotes. (GH-11982)Julien Palard2019-02-221-1/+1
|
* Doc: Fix typo. (GH-11315)Julien Palard2019-02-191-1/+1
| | | From: https://mail.python.org/pipermail/docs/2018-December/038583.html
* Clarify expectedFailure in the unittest docs. (#10953)Gregory P. Smith2018-12-061-2/+2
|
* Correct a typo in the Unittest documentation (GH-10397)Géry Ogam2018-11-091-1/+1
| | | | Co-Authored-By: maggyero <gery.ogam@gmail.com>
* bpo-24412: Adds cleanUps for setUpClass and setUpModule. (GH-9190)Lisa Roach2018-11-091-0/+65
|