Jacob Walls
c75ff2ef8e
gh-80958: unittest: discovery support for namespace packages as start directory ( #123820 )
2024-10-23 13:41:33 +09:00
Wei-Hsiang (Matt) Wang
103a0470e3
gh-123492: Remove unnecessary `:func:` parentheses ( #123493 )
2024-08-30 14:34:09 +03:00
Jan Musílek
f6f4022a35
gh-64308: Remove TestProgram from the unittest docs (GH-121675)
2024-07-14 10:57:12 +02:00
Ned Batchelder
bcb435ee8f
docs: module page titles should not start with a link to themselves ( #117099 )
2024-05-08 20:34:40 +01:00
Zackery Spytz
fc5f68e58e
gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)
2024-04-03 16:17:13 +02:00
Erlend E. Aasland
1d7bddd961
Docs: align usage of versionadded/versionchanged with recommended practice ( #114409 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-01-22 21:40:26 +00:00
Stefano Rivera
3a9096c337
GH-113661: unittest runner: Don't exit 5 if tests were skipped ( #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.
2024-01-09 19:50:01 +00:00
Taylor Packard
21d52995ea
gh-112890: `unittest` Test Discovery page updated "`unittest` dropped the namspace packages support" (GH-113195)
2023-12-17 13:14:21 +02:00
Alex Waygood
1addde0c69
gh-101100: Fix various Sphinx warnings for dunder references in the `library/` directory ( #113163 )
2023-12-15 19:15:34 +02:00
Hugo van Kemenade
3531ea441b
gh-101100: Fix Sphinx warning in references with asterisks ( #113029 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-13 09:24:55 +02:00
Hugo van Kemenade
0303a9fa79
gh-101100 : Fix Sphinx warnings in `library/doctest.rst` ( #112399 )
...
* Fix Sphinx warnings in library/doctest.rst
* Don't link to self, and wrap a line
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Link to load_tests protocol
* Link to option flags
* Wrap line
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-25 20:08:32 +02:00
Thomas Grainger
770530679e
gh-110774: allow setting the Runner(loop_factory=...) from IsolatedAsyncioTestCase ( #110776 )
...
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-31 15:03:54 -07:00
Adam Turner
77e9aae383
Docs: Avoid the deprecated ``.. cmdoption::`` directive ( #110292 )
2023-10-03 17:38:12 +00:00
Sebastian Rittau
6c484c39be
gh-108669: unittest: Fix documentation for TestResult.collectedDurations ( #108670 )
2023-08-30 09:36:59 +00:00
Serhiy Storchaka
d036db728e
gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894)
2023-07-21 12:34:30 +03:00
Rafael Fontenelle
68ed2a2a3f
GH-103484: Fix redirected permanently URLs ( #104001 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2023-05-02 09:34:44 +03:00
Stefano Rivera
76632b836c
gh-62432: unittest runner: Exit code 5 if no tests were run ( #102051 )
...
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
2023-04-27 01:28:46 +00:00
Giampaolo Rodola
ff3303e49c
gh-48330: address review comments to PR-12271 ( #103209 )
...
address review comments to PR-12271
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
2023-04-17 00:19:44 +02:00
Giampaolo Rodola
6883007a86
bpo-4080: unittest durations ( #12271 )
2023-04-03 00:12:51 +02:00
busywhitespace
6d3bc4a795
gh-100824: Fix typo in the documentation of unittest.TestLoader.testNamePatterns ( #100825 )
2023-01-08 13:37:16 +05:30
annonm
e6f9ec5c03
Fix typo in unittest docs ( #97742 )
2022-10-03 06:35:40 -07:00
Alexandru Mărășteanu
2a9c227ac1
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
2022-07-22 11:37:22 -05:00
Serhiy Storchaka
c834c02569
Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" (GH-92556)
...
This reverts commit b50322d203
.
2022-06-26 10:18:06 +03:00
Mikhail Terekhov
38486ca212
Fix typo in unittest.rst: addCleanupModule -> addModuleCleanup (GH-92631)
2022-05-11 09:14:12 +03:00
Serhiy Storchaka
086c6b1b0f
bpo-45046: Support context managers in unittest (GH-28045)
...
Add methods enterContext() and enterClassContext() in TestCase.
Add method enterAsyncContext() in IsolatedAsyncioTestCase.
Add function enterModuleContext().
2022-05-08 17:49:09 +03:00
Sam Ezeh
755be9b150
bpo-14265: Adds fully qualified test name to unittest output (GH-32138)
...
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-29 18:02:09 +03:00
Gregory P. Smith
b50322d203
bpo-45162: Revert "Remove many old deprecated unittest features" (GH-30935)
...
Revert "bpo-45162: Remove many old deprecated unittest features (GH-28268)"
This reverts commit b0a6ede3d0
.
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.
2022-01-26 20:39:15 -08:00
Inada Naoki
0b2b9d2513
bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745)
2022-01-10 10:38:33 +09:00
Hugo van Kemenade
2cf7d02b99
bpo-46178: Remove/rename redundant Travis CI code ( #30309 )
2021-12-30 16:16:27 -08:00
ch33zer
abc0d754c3
[docs] Add missing word "any" in unittest -k cmdline option description (GH-29571)
2021-11-18 00:25:53 +01:00
Serhiy Storchaka
b0a6ede3d0
bpo-45162: Remove many old deprecated unittest features (GH-28268)
...
* "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.
2021-09-17 13:33:27 +03:00
andrei kulakov
b1db308c61
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)
...
Also fix the traceback of warnings.
2021-08-22 21:32:45 +03:00
Irit Katriel
23ae2c3bac
bpo-10548: expectedFailure does not apply to fixtures ( #23201 )
2021-05-11 22:48:20 +01:00
Zackery Spytz
2abbd8f2ad
bpo-43954: Fix a missing word in the unittest docs (GH-25672)
2021-04-30 09:32:19 +02:00
Inada Naoki
5a4aa4c03e
bpo-23882: Doc: Clarify unittest discovery document (GH-21560)
...
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/`.
2021-02-22 15:14:26 +09:00
Conchylicultor
e0e398ef18
Fix typos in unittest documentation (GH-24194)
...
* addCleanupClass -> addClassCleanup
* doCleanupsClass -> doClassCleanups
2021-01-20 18:38:37 +05:30
Ram Rachum
bd8c22e1fa
bpo-42391: Clarify documentation of TestCase.assertIs (GH-23348)
...
Removing 'evaluate' makes it more consistent with other assertX entries.
2020-11-22 00:59:48 -05:00
Irit Katriel
fa8748271a
bpo-38320: Clarify that expectedFailure is satisfied by either failure or error of the test. (GH-22740)
2020-10-19 22:27:16 +01:00
Irit Katriel
1ed5443526
bpo-41898: add caveat on root logger seeing all messages in assertLogs doc (GH-22526)
2020-10-04 14:16:04 +01:00
Dmytro Litvinov
5e3826785d
bpo-41328: Replace mention of Hudson CI with Travis CI and AppVeyor (GH-21653)
2020-07-28 07:48:32 -07:00
Kit Choi
6b34d7b51e
bpo-39385: Add an assertNoLogs context manager to unittest.TestCase (GH-18067)
...
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2020-07-01 22:08:38 +01:00
Christoph Zwerschke
a388bbd3f1
Fix parameter names in assertIn() docs (GH-18829)
...
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".
2020-04-16 18:54:53 -07:00
Jules Lasne (jlasne)
b1f160a236
Add missing comma and period in unittest docs (GH-17211)
...
Automerge-Triggered-By: @csabella
2019-11-19 04:05:45 -08:00
Jon Dufresne
88eeda6311
Remove doc reference to unmaitained Nose package (GH-16849)
...
The Nose package is no longer maintained.
2019-10-19 12:22:20 -07:00
Xtreak
6a9fd66f6e
bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878)
...
* 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
2019-09-11 04:02:14 -07:00
Serhiy Storchaka
142566c028
[3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620)
...
Turn deprecation warnings added in 3.8 into TypeError.
2019-06-05 18:22:31 +03:00
Serhiy Storchaka
2085bd0877
bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)
2019-06-01 11:00:15 +03:00
Makdon
ffed76b6fc
bpo-37094: Add example for TestCase.skipTest in unittest doc (GH-13645)
...
Also includes other minor test skipping doc improvements.
https://bugs.python.org/issue37094
2019-05-31 09:19:11 -07:00
Jules Lasne (jlasne)
3d78c4a6e5
Fixed capital letters missing and missing . (GH-12584)
...
No `bpo` for minor doc fix
2019-03-28 14:06:27 -07:00
Julien Palard
6e240ddd0d
Doc: Missing backquotes. (GH-11982)
2019-02-22 00:22:27 -08:00