summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/test_case.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix miscellaneous typos (#4275)luzpaz2017-11-051-1/+1
|
* Fix ref cycles in TestCase.assertRaises() (#193)Victor Stinner2017-03-271-0/+13
| | | | bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference cycle to not keep objects alive longer than expected.
* Issue #27430: Fix typos, patch by scop.Berker Peksag2016-07-011-1/+1
|
* Issue #26837: assertSequenceEqual() now correctly outputs non-stringifiedSerhiy Storchaka2016-04-251-0/+76
| | | | | differing items (like bytes in the -b mode). This affects assertListEqual() and assertTupleEqual().
* Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-211-0/+56
| | | | | assertWarnsRegex() assertments now check the type of the first argument to prevent possible user error. Based on patch by Daniel Wagner-Hall.
* Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-161-4/+40
| | | | | assertWarnsRegex() checks now emits a deprecation warning when callable is None or keyword arguments except msg is passed in the context manager mode.
* Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-061-0/+52
|\ | | | | | | | | | | assertWarnsRegex() checks are not longer successful if the callable is None. Added tests for assertRaises().
| * Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-061-0/+52
| | | | | | | | | | | | assertWarnsRegex() checks are not longer successful if the callable is None. Added tests for assertRaises().
* | Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵Antoine Pitrou2014-11-231-0/+28
|\ \ | |/ | | | | when in failfast mode, even in the absence of failures.
| * Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵Antoine Pitrou2014-11-231-0/+28
| | | | | | | | when in failfast mode, even in the absence of failures.
* | Close #22756: Improve the test output for some assertEqual tests.Robert Collins2014-10-291-5/+3
| | | | | | | | | | | | These tests were undebuggable as written, and there's no testing fallacy involved in using the method we're testing to test the output of that method, so switch to that.
* | Issue #22186: Fix typos in Lib/.Berker Peksag2014-10-191-1/+1
|\ \ | |/ | | | | Patch by Févry Thibault.
| * Issue #22186: Fix typos in Lib/.Berker Peksag2014-10-191-1/+1
| | | | | | | | Patch by Févry Thibault.
* | #22092: merge with 3.4.Ezio Melotti2014-08-071-1/+1
|\ \ | |/
| * #22092: use absolute imports in unittest tests. Patch by Vajrasky Kok.Ezio Melotti2014-08-071-1/+1
| |
| * backport: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.R David Murray2014-03-251-0/+12
| | | | | | | | | | | | | | Previously a non-string, non-regex second argument and missing callable argument could cause the test to appear to always pass. Initial patch by Kamilla Holanda.
* | Fix typo in test method name.Mark Dickinson2014-04-181-1/+1
| |
* | #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.R David Murray2014-03-231-0/+12
|/ | | | | | | Previously a non-string, non-regex second argument could cause the test to always pass. Initial patch by Kamilla Holanda.
* Remove commented out debugging code (remnants of issue #18996).Serhiy Storchaka2013-12-101-2/+0
|
* Close #19880: Fix a reference leak in unittest.TestCase. Explicitly breakVictor Stinner2013-12-091-0/+26
| | | | reference cycles between frames and the _Outcome instance.
* Issue #19594: Use specific asserts in unittest tests.Serhiy Storchaka2013-11-161-6/+6
|\
| * Issue #19594: Use specific asserts in unittest tests.Serhiy Storchaka2013-11-161-6/+6
| |
* | Issue #18996: TestCase.assertEqual() now more cleverly shorten differingSerhiy Storchaka2013-09-231-3/+34
| | | | | | | | strings in error report.
* | Issue #18937: Add an assertLogs() context manager to unittest.TestCase to ↵Antoine Pitrou2013-09-141-0/+96
| | | | | | | | ensure that a block of code emits a message using the logging module.
* | Issue #19013: add unittest.main() epilogs to unittest's own test modulesAntoine Pitrou2013-09-131-0/+4
| |
* | #18741: merge with 3.3.Ezio Melotti2013-08-171-1/+1
|\ \ | |/
| * #18741: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-171-1/+1
| |
* | Issue #16997: unittest.TestCase now provides a subTest() context manager to ↵Antoine Pitrou2013-03-201-1/+93
|/ | | | procedurally generate, in an easy way, small test instances.
* test that TestCase doesn't get cyclesBenjamin Peterson2011-07-141-0/+9
|
* #11763: merge with 3.2.Ezio Melotti2011-04-271-0/+36
|\
| * #11763: merge with 3.1.Ezio Melotti2011-04-271-0/+36
| |
* | #11282: add back the fail* methods and assertDictContainsSubset.Ezio Melotti2011-04-031-0/+53
| |
* | #11282: merge with 3.2.Ezio Melotti2011-04-031-4/+2
|\ \ | |/
| * #11282: the fail* methods will stay around a few more versions.Ezio Melotti2011-04-031-4/+2
| |
* | Closes issue 11407. TestCase.run returns the result object used or createdMichael Foord2011-03-141-4/+39
| |
* | Remove unittest methods scheduled for removal in 3.3 -- makes the unittest ↵Georg Brandl2011-02-201-52/+0
|/ | | | test suite pass again.
* fix test_unittest: ignore DeprecationWarning on assertDictContainsSubset()Victor Stinner2011-01-031-19/+22
|
* Enable unittest.TestCase to be instantiated without providing a method name.Michael Foord2011-01-031-0/+10
| | | | Changed unittestgui to show number of discovered tests in the status bar.
* Add direct tests for the util functions.Raymond Hettinger2010-12-241-1/+13
|
* Add test for r87454.Raymond Hettinger2010-12-241-0/+3
|
* Deprecate assertDictContainsSubset()Raymond Hettinger2010-12-211-1/+2
|
* Issue 10611. Issue 9857. Improve the way exception handling, including test ↵Michael Foord2010-12-191-8/+87
| | | | skipping, is done inside TestCase.run
* #10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and ↵Ezio Melotti2010-12-011-35/+37
| | | | assertRaisesRegex.
* Issue 10242: unittest.assertItemsEqual makes too many assumptions.Raymond Hettinger2010-11-271-19/+26
|
* #9424: add a DeprecationWarning for assertEquals, assertNotEquals, ↵Ezio Melotti2010-11-221-19/+23
| | | | assertAlmostEquals, assertNotAlmostEquals, and assert_
* Issue 10326: further extend test for unpickling to ensure type lookup ↵Michael Foord2010-11-201-0/+4
| | | | mechanism works after unpickling
* Issue 10326: extend test for pickling of TestCase instances to ensure they ↵Michael Foord2010-11-201-0/+2
| | | | can be unpickled too
* Issue 10326: TestCase instances can now be pickled (they store names of ↵Michael Foord2010-11-201-0/+12
| | | | instance methods instead of references to the instance methods themselves).
* Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittestAntoine Pitrou2010-09-061-0/+134
| | | | | test cases now also have assertWarns and assertWarnsRegexp methods to check that a given warning type was triggered by the code under test.
* Fix error message for comparing single line strings in ↵Michael Foord2010-07-101-0/+15
| | | | | | unittest.TestCase.assertEqual. Issue 9174.