Antoine Pitrou
b05ac864f0
Issue #14664 : It is now possible to use @unittest.skip{If,Unless} on a test class that doesn't inherit from TestCase (i.e. a mixin).
2012-04-25 14:56:46 +02:00
Ezio Melotti
edd117fd27
#11763 : merge with 3.1.
2011-04-27 10:20:38 +03:00
Ezio Melotti
361467e522
#11282 : the fail* methods will stay around a few more versions.
2011-04-03 17:37:58 +03:00
Ezio Melotti
60c3c9f918
Save a copy of sys.warnoptions in test_program.
2011-03-20 15:31:26 +02:00
Michael Foord
42ec7cb105
Issue #10979 . unittest stdout buffering now works with class and module setup and teardown.
2011-03-17 13:44:18 -04:00
Victor Stinner
cae969e70a
fix test_unittest: ignore DeprecationWarning on assertDictContainsSubset()
2011-01-03 23:56:12 +00:00
Michael Foord
32e1d8340c
Enable unittest.TestCase to be instantiated without providing a method name.
...
Changed unittestgui to show number of discovered tests in the status bar.
2011-01-03 17:00:11 +00:00
Michael Foord
6f17e2df29
Issue 10786: unittest.TextTestRunner default stream no longer bound at import time
2010-12-30 19:36:29 +00:00
Raymond Hettinger
f954217458
Add direct tests for the util functions.
2010-12-24 10:30:06 +00:00
Raymond Hettinger
93e233d6e5
Improve diff for assertCountEqual() to actually show the differing counts.
...
New output looks like this:
Traceback (most recent call last):
File "test.py", line 5, in test_ce
self.assertCountEqual('abracadabra xx', 'simsalabim xx')
AssertionError: Element counts were not equal:
Expected 5, got 2: 'a'
Expected 2, got 1: 'b'
Expected 0, got 2: 'i'
Expected 0, got 2: 'm'
Expected 0, got 1: 'l'
Expected 0, got 2: 's'
Expected 1, got 0: 'c'
Expected 1, got 0: 'd'
Expected 2, got 0: 'r'
2010-12-24 10:02:22 +00:00
Raymond Hettinger
83961245b4
Add test for r87454.
2010-12-24 00:48:47 +00:00
Raymond Hettinger
8ebe27f300
Deprecate assertDictContainsSubset()
2010-12-21 19:24:26 +00:00
Michael Foord
cca5be2e4c
Improvement to fix for issue 9926 to allow TestResult to be reused.
2010-12-19 04:07:28 +00:00
Michael Foord
f100dbd600
Fix minor issue in implementation of issue 10470.
2010-12-19 03:59:10 +00:00
Michael Foord
b3468f79ef
Issue 10611. Issue 9857. Improve the way exception handling, including test skipping, is done inside TestCase.run
2010-12-19 03:19:47 +00:00
Ezio Melotti
3044fa77a5
Use lowercase true/false in assertTrue/assertFalse messages.
2010-12-18 17:31:58 +00:00
Ezio Melotti
8f77630747
#10273 : Remove a "Matches" that I missed in r86910. Thanks to RDM for noticing it.
2010-12-10 02:32:05 +00:00
Michael Foord
36526bf3d9
Correct comment in unittest test
2010-12-04 01:43:59 +00:00
Michael Foord
37d120aeb4
Issue 10620: Specifying test modules by path instead of module name to 'python -m unittest'
2010-12-04 01:11:21 +00:00
Michael Foord
5074df623b
Issue 7911: unittest.TestCase.longMessage defaults to True for improved failure messages by default
2010-12-03 00:53:09 +00:00
Ezio Melotti
ed3a7d2d60
#10273 : Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex.
2010-12-01 02:32:32 +00:00
Ezio Melotti
f10c400b91
Fix test failure in debug builds and add NEWS entry for r86908
2010-12-01 01:45:53 +00:00
Ezio Melotti
6090187656
#10535 : Enable silenced warnings in unittest by default
2010-12-01 00:56:10 +00:00
Raymond Hettinger
6e165b30de
Issue 10242: unittest.assertItemsEqual makes too many assumptions.
2010-11-27 09:31:37 +00:00
Ezio Melotti
2baf1a69f4
#9424 : add a DeprecationWarning for assertEquals, assertNotEquals, assertAlmostEquals, assertNotAlmostEquals, and assert_
2010-11-22 12:56:58 +00:00
Michael Foord
b87ef8f872
Improve test for 'python -m unittest' launching test discovery
2010-11-22 10:41:27 +00:00
Michael Foord
086f30815c
Issue 10470: 'python -m unittest' launches test discovery by default.(If you need to pass options to test discovery the discover subcommand must still be specified explicitly.)
2010-11-21 21:28:01 +00:00
Ezio Melotti
b3aedd4862
#9424 : Replace deprecated assert* methods in the Python test suite.
2010-11-20 19:04:17 +00:00
Michael Foord
b357fb7bed
Issue 10326: further extend test for unpickling to ensure type lookup mechanism works after unpickling
2010-11-20 15:47:56 +00:00
Michael Foord
8a00eec2a8
Issue 10326: extend test for pickling of TestCase instances to ensure they can be unpickled too
2010-11-20 15:43:02 +00:00
Michael Foord
8ca6d9884b
Issue 10326: TestCase instances can now be pickled (they store names of instance methods instead of references to the instance methods themselves).
2010-11-20 15:34:26 +00:00
Michael Foord
bbea35f194
Fix issue 9926. TestSuite subclasses that override __call__ are called correctly.
2010-11-01 21:09:03 +00:00
Antoine Pitrou
4bc12ef47d
Issue #9754 : Similarly to assertRaises and assertRaisesRegexp, unittest
...
test cases now also have assertWarns and assertWarnsRegexp methods to
check that a given warning type was triggered by the code under test.
2010-09-06 19:25:46 +00:00
Michael Foord
c653ce313f
Fix error message for comparing single line strings in unittest.TestCase.assertEqual.
...
Issue 9174.
2010-07-10 13:52:22 +00:00
Michael Foord
2b293cf1a5
Merged revisions 81878 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81878 | michael.foord | 2010-06-10 21:40:21 +0100 (Thu, 10 Jun 2010) | 2 lines
Fix issue with nested test suites debug method and module setups. (unittest)
........
2010-06-10 20:41:54 +00:00
Michael Foord
b874874194
Merged revisions 81853 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81853 | michael.foord | 2010-06-08 23:44:52 +0100 (Tue, 08 Jun 2010) | 1 line
Issue 8948. cleanup functions are not run by unittest.TestCase.debug(), plus class and module teardowns are not run by unittest.TestSuite.debug().
........
2010-06-10 16:16:08 +00:00
Michael Foord
520ed0a150
Merged revisions 81764 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81764 | michael.foord | 2010-06-05 21:59:00 +0100 (Sat, 05 Jun 2010) | 1 line
Tests for issue 8302, skipped test in a setUpClass or a setUpModule are reported as skips rather than errors.
........
2010-06-05 21:12:23 +00:00
Michael Foord
da562f65e9
Merged revisions 81763 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81763 | michael.foord | 2010-06-05 21:33:43 +0100 (Sat, 05 Jun 2010) | 1 line
Tests for unittest.TestCase.maxDiff.
........
2010-06-05 21:01:08 +00:00
Michael Foord
ac76074628
Merged revisions 81753 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81753 | michael.foord | 2010-06-05 14:48:27 +0100 (Sat, 05 Jun 2010) | 1 line
Fix unittest tests after previous commit.
........
2010-06-05 13:57:23 +00:00
Michael Foord
085dfd3ad5
Merged revisions 81739 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81739 | michael.foord | 2010-06-05 13:10:52 +0100 (Sat, 05 Jun 2010) | 1 line
Removed the new max_diff argument to assertSequenceEqual. All 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.
........
2010-06-05 12:17:02 +00:00
Michael Foord
67c399f93e
Test fix to use floor division. Correction from merge in previous commit.
2010-06-05 11:30:23 +00:00
Michael Foord
2034d9a996
Merged revisions 81728 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81728 | michael.foord | 2010-06-05 12:23:51 +0100 (Sat, 05 Jun 2010) | 1 line
Issue 8351. Suppress large diffs in unittest.TestCase.assertSequenceEqual.
........
2010-06-05 11:27:52 +00:00
Michael Foord
ffa2e4ee55
Merged revisions 81022 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81022 | michael.foord | 2010-05-09 11:58:25 +0200 (Sun, 09 May 2010) | 1 line
Adding a test for unittest.BaseTestSuite.
........
2010-05-09 09:59:35 +00:00
Michael Foord
73162197aa
Merged revisions 80997 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80997 | michael.foord | 2010-05-08 19:06:25 +0200 (Sat, 08 May 2010) | 1 line
unittest: issue 8301. Adding functions to test suites no longer crashes.
........
2010-05-08 17:10:05 +00:00
Michael Foord
161b024b6d
Merged revisions 80974 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80974 | michael.foord | 2010-05-08 15:20:07 +0200 (Sat, 08 May 2010) | 1 line
Issue 7780. Adding a test for unittest test discovery from a dotted path.
........
2010-05-08 13:23:31 +00:00
Michael Foord
3b2494f38c
Merged revisions 80946 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80946 | michael.foord | 2010-05-08 01:39:38 +0200 (Sat, 08 May 2010) | 1 line
Issue 8547 - detecting and reporting that modules have been imported from the wrong location under test discovery.
........
2010-05-07 23:42:40 +00:00
Benjamin Peterson
135d87c23c
Merged revisions 80939 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80939 | benjamin.peterson | 2010-05-07 15:45:07 -0500 (Fri, 07 May 2010) | 1 line
revert r80932; it breaks windows
........
2010-05-07 20:47:43 +00:00
Michael Foord
01984e9629
Merged revisions 80932 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80932 | michael.foord | 2010-05-07 20:16:19 +0200 (Fri, 07 May 2010) | 1 line
Issue 8547 - detecting and reporting that modules have been imported from the wrong location under test discovery.
........
2010-05-07 18:18:14 +00:00
Michael Foord
56fdb75453
Merged revisions 80920 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80920 | michael.foord | 2010-05-07 17:52:05 +0200 (Fri, 07 May 2010) | 1 line
Adding tests for unittest command line handling of buffer, catchbreak and failfast.
........
2010-05-07 16:00:30 +00:00
Michael Foord
4a8cf3c50b
Merged revisions 80918 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r80918 | michael.foord | 2010-05-07 17:34:08 +0200 (Fri, 07 May 2010) | 1 line
Adding a test for unittest test discovery with dotted path name.
........
2010-05-07 15:35:24 +00:00