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
Julien Palard
513e9b4425
Doc: Fix typo. (GH-11315)
...
From: https://mail.python.org/pipermail/docs/2018-December/038583.html
2019-02-19 06:46:07 -08:00
Gregory P. Smith
91f259b478
Clarify expectedFailure in the unittest docs. ( #10953 )
2018-12-06 12:56:24 -08:00
Géry Ogam
009b2f0204
Correct a typo in the Unittest documentation (GH-10397)
...
Co-Authored-By: maggyero <gery.ogam@gmail.com>
2018-11-09 14:34:54 -05:00
Lisa Roach
0f221d09ca
bpo-24412: Adds cleanUps for setUpClass and setUpModule. (GH-9190)
2018-11-08 18:34:33 -08:00
Andreas Pelme
d855f2fdbd
unittest documentation: Spell pytest without the dot (GH-9820)
...
Referring to ``pytest`` as ``py.test`` is deprecated.
2018-10-27 11:09:12 -07:00
Stéphane Wirtel
e483f02423
bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)
2018-10-26 12:52:11 +02:00
Benjamin Peterson
e006b39a40
Make it clear that the msg argument to assertWarns/assertWarnsRegex/assertRaisesRegex is keyword-only. (GH-9680)
...
A follow up to be4e5b8920
.
2018-10-02 21:38:39 -07:00
Benjamin Peterson
be4e5b8920
Make it clear that the msg argument to assertRaises is keyword-only. (GH-9670)
2018-10-01 22:18:44 -07:00
Ville Skyttä
c33bb5d401
Make it more clear that setUpClass runs before each class, not "class run" (GH-8844)
2018-08-23 07:49:18 -07:00
Berker Peksag
2e5566d9e7
Fix reST markup in unittest documentation (GH-8665)
2018-08-04 00:56:55 +03:00
Gregory P. Smith
dff46758f2
bpo-19950: Clarify unittest TestCase instance use. (GH-6875)
2018-05-17 10:08:45 -05:00
Mariatta
98f42aac23
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
...
`whilst` and `while` are both english words, `whilst` is not as commonly used.
This can be confusing to readers whose primary language is not english.
2018-02-23 09:51:11 -08:00
Sanyam Khurana
1b4587a246
bpo-25910: Fixes redirection from http to https ( #4674 )
2017-12-06 17:39:33 +01:00
Jonas Haag
5b48dc638b
bpo-32071: Add unittest -k option ( #4496 )
...
* bpo-32071: Add unittest -k option
2017-11-25 16:23:52 +01:00