summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/case.py
Commit message (Collapse)AuthorAgeFilesLines
* 00132-add-rpmbuild-hooks-to-unittest.patchFedora Python maintainers2020-09-291-0/+38
| | | | | | | | | | | | | | | 00132 # Add non-standard hooks to unittest for use in the "check" phase below, when running selftests within the build: @unittest._skipInRpmBuild(reason) for tests that hang or fail intermittently within the build environment, and: @unittest._expectedFailureInRpmBuild for tests that always fail within the build environment The hooks only take effect if WITHIN_PYTHON_RPM_BUILD is set in the environment, which we set manually in the appropriate portion of the "check" phase below (and which potentially other python-* rpms could set, to reuse these unittest hooks in their own "check" phases)
* Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. ↵Miss Islington (bot)2017-10-181-2/+3
| | | | | | | (GH-3998) (GH-4040) The word "difference" from missing the sentence. This clarifies that it compares the difference between the two objects. (cherry picked from commit 032a6480e360427d4f964e31643604fad804ea14)
* Issue #27626: Spelling fixes in docs, comments and internal namesMartin Panter2016-07-281-2/+2
| | | | Based on patch by Ville Skyttä.
* Issue #26837: assertSequenceEqual() now correctly outputs non-stringifiedSerhiy Storchaka2016-04-251-3/+3
| | | | differing items. This affects assertListEqual() and assertTupleEqual().
* Reverted issue #24134 changes.Serhiy Storchaka2015-05-161-7/+5
|
* Fixed English in error message.Serhiy Storchaka2015-05-061-1/+1
|
* Issue #24134: assertRaises() and assertRaisesRegexp() checks are not longerSerhiy Storchaka2015-05-061-5/+7
| | | | | | successful if the callable is None. Added tests for assertRaises().
* backport: #20145: assertRaisesRegexp now raises a TypeError on bad regex.R David Murray2014-03-251-2/+2
| | | | | Previously a non-string, non-regex second argument and no callable argument could cause the test to appear to always pass.
* #8906: document failureException, longMessage, and maxDiff in the class ↵Ezio Melotti2013-03-291-12/+11
| | | | docstring. Patch by Boris Feld.
* #17329: document unittest.SkipTest. Initial patch by Zachary Ware.Ezio Melotti2013-03-271-1/+1
|
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-181-2/+2
| | | | Patch by Serhiy Storchaka.
* #16433: fix docstring of assertNotEqual.Ezio Melotti2012-11-081-1/+1
|
* Issue #8767: Restore building with --disable-unicode.Martin v. Löwis2012-05-201-1/+5
| | | | Original patch by Stefano Taschini.
* #14832: 'first' now really refers to first arg in unittest assertItemsEqualR David Murray2012-05-161-1/+1
| | | | | | This appears to have been a mixup introduced when we switched from 'expected/actual' to 'first/second'. The problem doesn't exist in the corresponding assertCountEqual method in Python3.
* Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a test ↵Antoine Pitrou2012-04-251-1/+2
| | | | class that doesn't inherit from TestCase (i.e. a mixin).
* this can be done without a custom dict (also fixes #12544)Benjamin Peterson2011-07-131-22/+3
|
* Issue 10326: Fix regression to get test cases to pickle again.Raymond Hettinger2011-06-251-7/+28
|
* #11763: don't use difflib in TestCase.assertMultiLineEqual if the strings ↵Ezio Melotti2011-04-271-0/+8
| | | | are too long.
* Issue #10242: backport of more fixes to unittest.TestCase.assertItemsEqualMichael Foord2011-03-171-20/+17
|
* Issue 10242. Switching unittest.TestCase.assertItemsEqual to use a ↵Michael Foord2010-12-191-14/+14
| | | | | | collections.Counter under the hood. This fixes bugs when comparing collections of items like sets that can be sorted without raising an exception but where sorting has no meaning.
* Issue 10611. SystemExit should not cause a unittest test run to exit.Michael Foord2010-12-191-4/+12
|
* Merged revisions 87377 via svnmerge fromEzio Melotti2010-12-181-4/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87377 | ezio.melotti | 2010-12-18 18:31:58 +0100 (Sat, 18 Dec 2010) | 1 line Use lowercase true/false in assertTrue/assertFalse messages. ........
* Merged revisions 86596 via svnmerge fromEzio Melotti2010-11-211-6/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
* Fix error message for comparing single line strings in ↵Michael Foord2010-07-101-3/+8
| | | | | | unittest.TestCase.assertEqual. Issue 9174
* Typo correction.Michael Foord2010-06-091-1/+1
|
* Issue 8948. cleanup functions are not run by unittest.TestCase.debug(), plus ↵Michael Foord2010-06-081-0/+3
| | | | class and module teardowns are not run by unittest.TestSuite.debug().
* Code formatting change.Michael Foord2010-06-051-0/+1
|
* Fix unittest tests after previous commit.Michael Foord2010-06-051-1/+1
|
* unittest.TestCase assertion methods inform you when they have omitted an ↵Michael Foord2010-06-051-1/+5
| | | | over long diff on failure. Issue 8351.
* unittest.TestCase.assertDictEqual and assertMultilineEqual provide better ↵Michael Foord2010-06-051-2/+4
| | | | default failure messages in the event of long diffs.
* Removed the new max_diff argument to assertSequenceEqual. All ↵Michael Foord2010-06-051-9/+14
| | | | unittest.TestCase assert methods that use difflib to produce failure messages now truncate overly long messages. New class attribute unittest.TestCase.maxDiff to configure this if necessary. Issue 8351.
* Extract error message truncating into a method ↵Michael Foord2010-06-051-4/+6
| | | | (unittest.TestCase._truncateMessage).
* Issue 8351. Suppress large diffs in unittest.TestCase.assertSequenceEqual.Michael Foord2010-06-051-3/+10
|
* Updating documentation and adding docstrings to ↵Michael Foord2010-05-081-0/+2
| | | | unittest.TestCase.assertRegexpMatches and assertNotRegexpMatches. Issue 8038.
* Issue #8038: Addition of unittest.TestCase.assertNotRegexpMatchesMichael Foord2010-04-021-0/+12
|
* Addition of delta keyword argument to unittest.TestCase.assertAlmostEquals ↵Michael Foord2010-03-271-13/+45
| | | | | | 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.
* Issue 7815. __unittest in module globals trims frames from reported ↵Michael Foord2010-03-221-0/+3
| | | | stacktraces in unittest.
* Silence more py3k warnings in unittest.case.Florent Xicluna2010-03-211-2/+2
|
* Issue 7832: renaming unittest.TestCase.assertSameElements to ↵Michael Foord2010-03-201-24/+30
| | | | assertItemsEqual and changing behaviour
* Remove accidental print statement from last commit.Michael Foord2010-03-071-1/+0
|
* Fix accidental name rebinding in unittest py3k warning filtering.Michael Foord2010-03-071-2/+3
|
* Addition of setUpClass and setUpModule shared fixtures to unittest.Michael Foord2010-03-071-0/+11
|
* Fix for potentials errors in constructing unittest failure messages. Plus ↵Michael Foord2010-03-071-13/+23
| | | | skipped test methods no longer run setUp and tearDown (Issue 8059)
* Fix some py3k warnings in the standard library.Florent Xicluna2010-03-071-20/+17
|
* Support for old TestResult object (unittest) with warnings when using ↵Michael Foord2010-02-221-5/+26
| | | | unsupported features.
* Fix unittest.TestCase.assertDictContainsSubset so it can't die with unicode ↵Michael Foord2010-02-181-3/+4
| | | | issues when constructing failure messages. Issue 7956
* unittest.TestCase uses safe_repr for producing failure messages. Partial fix ↵Michael Foord2010-02-181-34/+46
| | | | for issue 7956
* Remove deprecation on assert_. It is used too frequently.Michael Foord2010-02-101-1/+1
|
* Issue 7893 and Issue 7588Michael Foord2010-02-101-10/+7
|
* Make assertMultiLineEqual the default for comparing unicode strings.Michael Foord2010-02-081-0/+1
|