summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unittest/test_program.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-127873: Only check `sys.flags.ignore_environment` for `PYTHON*` env vars ↵Hugo van Kemenade2025-01-211-6/+1
| | | | (#127877)
* gh-71339: Add additional assertion methods for unittest (GH-128707)Serhiy Storchaka2025-01-141-5/+5
| | | | | | | | | | | | Add the following methods: * assertHasAttr() and assertNotHasAttr() * assertIsSubclass() and assertNotIsSubclass() * assertStartsWith() and assertNotStartsWith() * assertEndsWith() and assertNotEndsWith() Also improve error messages for assertIsInstance() and assertNotIsInstance().
* gh-127221: Add colour to unittest output (#127223)Hugo van Kemenade2024-12-051-0/+6
| | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* GH-44626, GH-105476: Fix `ntpath.isabs()` handling of part-absolute paths ↵Barney Gale2024-01-131-2/+2
| | | | | | | | | | | | | (#113829) On Windows, `os.path.isabs()` now returns `False` when given a path that starts with exactly one (back)slash. This is more compatible with other functions in `os.path`, and with Microsoft's own documentation. Also adjust `pathlib.PureWindowsPath.is_absolute()` to call `ntpath.isabs()`, which corrects its handling of partial UNC/device paths like `//foo`. Co-authored-by: Jon Foster <jon@jon-foster.co.uk>
* GH-113661: unittest runner: Don't exit 5 if tests were skipped (#113856)Stefano Rivera2024-01-091-0/+12
| | | | | 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.
* gh-62432: unittest runner: Exit code 5 if no tests were run (#102051)Stefano Rivera2023-04-271-20/+37
| | | | | | | | 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
* bpo-4080: unittest durations (#12271)Giampaolo Rodola2023-04-021-2/+7
|
* Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" ↵Serhiy Storchaka2022-06-261-8/+8
| | | | | | (GH-92556) This reverts commit b50322d20337ca468f2070eedb051a16ee1eba94.
* gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-221-2/+0
|
* gh-93839: Move Lib/unttest/test/ to Lib/test/test_unittest/ (#94043)Victor Stinner2022-06-211-0/+477
* Move Lib/unittest/test/ to Lib/test/test_unittest/ * Remove Lib/test/test_unittest.py * Replace unittest.test with test.test_unittest * Remove unittest.load_tests() * Rewrite unittest __init__.py and __main__.py * Update build system, CODEOWNERS, and wasm_assets.py