summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/runner.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "bpo-45162: Revert "Remove many old deprecated unittest features"" ↵Serhiy Storchaka2022-06-261-9/+0
| | | | | | (GH-92556) This reverts commit b50322d20337ca468f2070eedb051a16ee1eba94.
* bpo-45162: Revert "Remove many old deprecated unittest features" (GH-30935)Gregory P. Smith2022-01-271-0/+9
| | | | | | | | | | 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-22815: Print unexpected successes in summary in TextTestResult (GH-30138)Serhiy Storchaka2021-12-261-0/+6
|
* bpo-13236: Flush the output stream more often in unittest (GH-29864)Serhiy Storchaka2021-12-041-0/+6
| | | It can prevent some losses when output to buffered stream.
* bpo-45162: Remove many old deprecated unittest features (GH-28268)Serhiy Storchaka2021-09-171-9/+0
| | | | | | | * "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-25894: Always report skipped and failed subtests separately (GH-28082)Serhiy Storchaka2021-09-101-4/+34
| | | | | | * In default mode output separate characters for skipped and failed subtests. * In verbose mode output separate lines (including description) for skipped and failed subtests. * In verbose mode output test description for errors in test cleanup.
* bpo-35513, unittest: TextTestRunner uses time.perf_counter() (GH-11180)Victor Stinner2018-12-171-2/+2
| | | | | | | TextTestRunner of unittest.runner now uses time.perf_counter() rather than time.time() to measure the execution time of a test: time.time() can go backwards, whereas time.perf_counter() is monotonic. Similar change made in libregrtest, pprint and random.
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-1/+1
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Issue #22936: Allow showing local variables in unittest errors.Robert Collins2015-03-061-1/+9
|
* Closes issue #12376 : Pass on parameters in unittest.TextTestResult.__init__ ↵Michael Foord2012-09-281-1/+1
| | | | super call
* Issue 10786: unittest.TextTestRunner default stream no longer bound at ↵Michael Foord2010-12-301-1/+3
| | | | import time
* #10535: Enable silenced warnings in unittest by defaultEzio Melotti2010-12-011-12/+27
|
* reduce try block compassBenjamin Peterson2010-11-181-1/+2
|
* Merged revisions ↵Benjamin Peterson2010-04-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 79464,79471,79623,79626,79630,79632,79643,79648-79649,79679,79685,79711,79761,79774,79777,79792-79794,79877,79898-79900 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79464 | michael.foord | 2010-03-27 07:55:19 -0500 (Sat, 27 Mar 2010) | 1 line A fix for running unittest tests on platforms without the audioop module (e.g. jython and IronPython) ........ r79471 | michael.foord | 2010-03-27 14:10:11 -0500 (Sat, 27 Mar 2010) | 4 lines Addition of delta keyword argument to unittest.TestCase.assertAlmostEquals and assertNotAlmostEquals This allows the comparison of objects by specifying a maximum difference; this includes the comparing of non-numeric objects that don't support rounding. ........ r79623 | michael.foord | 2010-04-02 16:42:47 -0500 (Fri, 02 Apr 2010) | 1 line Addition of -b command line option to unittest for buffering stdout and stderr during test runs. ........ r79626 | michael.foord | 2010-04-02 17:08:29 -0500 (Fri, 02 Apr 2010) | 1 line TestResult stores original sys.stdout and tests no longer use sys.__stdout__ (etc) in tests for unittest -b command line option ........ r79630 | michael.foord | 2010-04-02 17:30:56 -0500 (Fri, 02 Apr 2010) | 1 line unittest tests no longer replace the sys.stdout put in place by regrtest ........ r79632 | michael.foord | 2010-04-02 17:55:59 -0500 (Fri, 02 Apr 2010) | 1 line Issue #8038: Addition of unittest.TestCase.assertNotRegexpMatches ........ r79643 | michael.foord | 2010-04-02 20:15:21 -0500 (Fri, 02 Apr 2010) | 1 line Support dotted module names for test discovery paths in unittest. Issue 8038. ........ r79648 | michael.foord | 2010-04-02 21:21:39 -0500 (Fri, 02 Apr 2010) | 1 line Cross platform unittest.TestResult newline handling when buffering stdout / stderr. ........ r79649 | michael.foord | 2010-04-02 21:33:55 -0500 (Fri, 02 Apr 2010) | 1 line Another attempt at a fix for unittest.test.test_result for windows line endings ........ r79679 | michael.foord | 2010-04-03 09:52:18 -0500 (Sat, 03 Apr 2010) | 1 line Adding -b command line option to the unittest usage message. ........ r79685 | michael.foord | 2010-04-03 10:20:00 -0500 (Sat, 03 Apr 2010) | 1 line Minor tweak to unittest command line usage message ........ r79711 | michael.foord | 2010-04-03 12:03:11 -0500 (Sat, 03 Apr 2010) | 1 line Documenting new features in unittest ........ r79761 | michael.foord | 2010-04-04 17:41:54 -0500 (Sun, 04 Apr 2010) | 1 line unittest documentation formatting changes ........ r79774 | michael.foord | 2010-04-04 18:28:44 -0500 (Sun, 04 Apr 2010) | 1 line Adding documentation for new unittest.main() parameters ........ r79777 | michael.foord | 2010-04-04 19:39:50 -0500 (Sun, 04 Apr 2010) | 1 line Document signal handling functions in unittest.rst ........ r79792 | michael.foord | 2010-04-05 05:26:26 -0500 (Mon, 05 Apr 2010) | 1 line Documentation fixes for unittest ........ r79793 | michael.foord | 2010-04-05 05:28:27 -0500 (Mon, 05 Apr 2010) | 1 line Furterh documentation fix for unittest.rst ........ r79794 | michael.foord | 2010-04-05 05:30:14 -0500 (Mon, 05 Apr 2010) | 1 line Further documentation fix for unittest.rst ........ r79877 | michael.foord | 2010-04-06 18:18:16 -0500 (Tue, 06 Apr 2010) | 1 line Fix module directory finding logic for dotted paths in unittest test discovery. ........ r79898 | michael.foord | 2010-04-07 18:04:22 -0500 (Wed, 07 Apr 2010) | 1 line unittest.result.TestResult does not create its buffers until they're used. It uses StringIO not cStringIO. Issue 8333. ........ r79899 | michael.foord | 2010-04-07 19:04:24 -0500 (Wed, 07 Apr 2010) | 1 line Switch regrtest to use StringIO instead of cStringIO for test_multiprocessing on Windows. Issue 8333. ........ r79900 | michael.foord | 2010-04-07 23:33:20 -0500 (Wed, 07 Apr 2010) | 1 line Correction of unittest documentation typos and omissions ........
* Merged revisions 79437 via svnmerge fromMichael Foord2010-03-271-0/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79437 | michael.foord | 2010-03-26 03:18:31 +0000 (Fri, 26 Mar 2010) | 1 line Addition of -c command line option to unittest, to handle ctrl-c during a test run more elegantly ........
* Merged revisions 79265-79266 via svnmerge fromBenjamin Peterson2010-03-221-1/+3
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79265 | michael.foord | 2010-03-21 20:01:34 -0500 (Sun, 21 Mar 2010) | 1 line -f/--failfast command line option for unittest. Issue 8074. Documentation still needed. Plus minor change to test_unittest to allow it to be run with python -m test.unittest ........ r79266 | michael.foord | 2010-03-21 20:02:23 -0500 (Sun, 21 Mar 2010) | 1 line Fix failing test committed by accident. ........
* Merged revisions 79263 via svnmerge fromBenjamin Peterson2010-03-221-0/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79263 | michael.foord | 2010-03-21 19:06:30 -0500 (Sun, 21 Mar 2010) | 1 line Issue 7815. __unittest in module globals trims frames from reported stacktraces in unittest. ........
* Merged revisions 78227,78229,78288,78348,78377,78770,78774-78776,78810 via ↵Benjamin Peterson2010-03-141-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78227 | michael.foord | 2010-02-18 14:30:09 -0600 (Thu, 18 Feb 2010) | 1 line unittest.TestCase uses safe_repr for producing failure messages. Partial fix for issue 7956 ........ r78229 | michael.foord | 2010-02-18 15:37:07 -0600 (Thu, 18 Feb 2010) | 1 line Fix unittest.TestCase.assertDictContainsSubset so it can't die with unicode issues when constructing failure messages. Issue 7956 ........ r78288 | michael.foord | 2010-02-21 08:48:59 -0600 (Sun, 21 Feb 2010) | 1 line Silence UnicodeWarning in crazy unittest test. ........ r78348 | michael.foord | 2010-02-22 17:28:32 -0600 (Mon, 22 Feb 2010) | 1 line Support for old TestResult object (unittest) with warnings when using unsupported features. ........ r78377 | michael.foord | 2010-02-23 11:00:53 -0600 (Tue, 23 Feb 2010) | 1 line unittest.TestResult can now be used with the TextTestRunner. TextTestRunner compatible with old TestResult objects. ........ r78770 | michael.foord | 2010-03-07 14:22:12 -0600 (Sun, 07 Mar 2010) | 1 line Fix for potentials errors in constructing unittest failure messages. Plus skipped test methods no longer run setUp and tearDown (Issue 8059) ........ r78774 | michael.foord | 2010-03-07 16:04:55 -0600 (Sun, 07 Mar 2010) | 1 line Addition of setUpClass and setUpModule shared fixtures to unittest. ........ r78775 | michael.foord | 2010-03-07 17:10:36 -0600 (Sun, 07 Mar 2010) | 1 line Fix accidental name rebinding in unittest py3k warning filtering. ........ r78776 | michael.foord | 2010-03-07 17:16:20 -0600 (Sun, 07 Mar 2010) | 1 line Remove accidental print statement from last commit. ........ r78810 | raymond.hettinger | 2010-03-09 02:44:18 -0600 (Tue, 09 Mar 2010) | 5 lines Improve the basic example. * Show both the decorator and regular form for assertRaises() * Use assertTrue() instead of assertIn() to teach useful minimal subset of the API ........
* Merged revisions 78130 via svnmerge fromMichael Foord2010-02-101-13/+19
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78130 | michael.foord | 2010-02-10 14:25:12 +0000 (Wed, 10 Feb 2010) | 1 line Issue 7893 and Issue 7588 ........
* Merged revisions 76196 via svnmerge fromAntoine Pitrou2009-11-101-0/+2
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76196 | antoine.pitrou | 2009-11-10 21:49:30 +0100 (mar., 10 nov. 2009) | 8 lines Issue #7197: Allow unittest.TextTestRunner objects to be pickled and unpickled. This fixes crashes under Windows when trying to run test_multiprocessing in verbose mode. Additionally, Test_TextTestRunner hadn't been enabled in test_unittest. ........
* Merged revisions 74095 via svnmerge fromBenjamin Peterson2009-07-191-0/+172
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74095 | benjamin.peterson | 2009-07-19 15:18:21 -0500 (Sun, 19 Jul 2009) | 1 line split unittest.py into a package ........