Michael Foord
b35ecf4775
Rename the unittest test_suite function to not clash with a test module name (unittest.test.test_suite is now unambiguous).
2010-03-27 13:42:34 +00:00
Benjamin Peterson
c7024e7fd6
reorder imports
2010-03-26 13:53:32 +00:00
Michael Foord
35b3792ed3
Turn unittest tests into a package
2010-03-25 23:56:33 +00:00
Florent Xicluna
fd37dd46e8
Fix test_unittest and test_warnings when running "python -Werror -m test.regrtest"
2010-03-25 20:39:10 +00:00
Michael Foord
0ce167277a
expected failure should not trigger failfast behavior in unittest.
2010-03-22 01:56:54 +00:00
Michael Foord
49899690a8
Removing Python 2.3 compatibility code from unittest.
2010-03-22 01:41:11 +00:00
Michael Foord
db003cb3d1
Fix failing test committed by accident.
2010-03-22 01:02:23 +00:00
Michael Foord
1b9e95339d
-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
2010-03-22 01:01:34 +00:00
Michael Foord
b1aa30f94d
Issue 7815. __unittest in module globals trims frames from reported stacktraces in unittest.
2010-03-22 00:06:30 +00:00
Michael Foord
73dbe04619
A faulty load_tests in a test module no longer halts test discovery. A placeholder test, that reports the failure, is created instead.
2010-03-21 00:53:39 +00:00
Michael Foord
98e7b7644b
Issue 7832: renaming unittest.TestCase.assertSameElements to assertItemsEqual and changing behaviour
2010-03-20 03:00:34 +00:00
Michael Foord
5ffa325a82
Addition of setUpClass and setUpModule shared fixtures to unittest.
2010-03-07 22:04:55 +00:00
Michael Foord
53e8eeadd6
Fix for potentials errors in constructing unittest failure messages. Plus skipped test methods no longer run setUp and tearDown (Issue 8059)
2010-03-07 20:22:12 +00:00
Michael Foord
d99ef9a9df
unittest.TestResult can now be used with the TextTestRunner. TextTestRunner compatible with old TestResult objects.
2010-02-23 17:00:53 +00:00
R. David Murray
f28fd24c36
Issue 6292: for the moment at least, the test suite passes if run
...
with -OO. Tests requiring docstrings are skipped. Patch by
Brian Curtin, thanks to Matias Torchinsky for helping review and
improve the patch.
2010-02-23 00:24:49 +00:00
Michael Foord
ae3db0a12b
Support for old TestResult object (unittest) with warnings when using unsupported features.
2010-02-22 23:28:32 +00:00
Michael Foord
2f6775617c
Silence UnicodeWarning in crazy unittest test.
2010-02-21 14:48:59 +00:00
Michael Foord
c2294dd6ba
Fix unittest.TestCase.assertDictContainsSubset so it can't die with unicode issues when constructing failure messages. Issue 7956
2010-02-18 21:37:07 +00:00
Michael Foord
225a099fe5
unittest.TestCase uses safe_repr for producing failure messages. Partial fix for issue 7956
2010-02-18 20:30:09 +00:00
Michael Foord
1c3abf475e
Fix for unittest tests, to be merged to py3k
2010-02-10 15:50:58 +00:00
Michael Foord
db43b5a1f5
Issue 7893 and Issue 7588
2010-02-10 14:25:12 +00:00
Michael Foord
fe6349c965
Make assertMultiLineEqual the default for comparing unicode strings.
2010-02-08 22:41:16 +00:00
Michael Foord
2bd52dcccb
assertRaises as context manager now allows you to access exception as documented
2010-02-07 18:44:12 +00:00
Georg Brandl
dc3694bee0
Rename "exc_value" attribute on assertRaises context manager to "exception".
2010-02-07 17:02:22 +00:00
Michael Foord
0877060f86
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
2010-02-06 00:22:26 +00:00
Ezio Melotti
0ac4d4c82d
Silence a couple of -3 warnings
2010-02-02 15:12:42 +00:00
Ezio Melotti
b0f5adc3f4
use assert[Not]IsInstance where appropriate
2010-01-24 16:58:36 +00:00
Ezio Melotti
aa98058cc4
use assert[Not]In where appropriate
2010-01-23 23:04:36 +00:00
Senthil Kumaran
ce8e33a095
Reverting the Revision: 77368. I committed Flox's big patch for tests by
...
mistake. ( It may come in for sure tough)
2010-01-08 19:04:16 +00:00
Senthil Kumaran
3ddc435af6
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
2010-01-08 18:41:40 +00:00
Antoine Pitrou
0734c632d5
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.
2009-11-10 20:49:30 +00:00
Nick Coghlan
b6edf193fb
Check and revert expected sys.path alterations
2009-10-17 08:21:21 +00:00
Georg Brandl
f895cf5d33
#7031 : Add TestCase.assertIsInstance and negated method.
2009-10-01 20:59:31 +00:00
Michael Foord
e91ea56b30
Test discovery in unittest will only attempt to import modules that are importable; i.e. their names are valid Python identifiers. If an import fails during discovery this will be recorded as an error and test discovery will continue. Issue 6568.
2009-09-13 19:07:03 +00:00
Michael Foord
5a9719d627
unittest.TestLoader.loadTestsFromName honors the loader suiteClass attribute. Issue 6866.
2009-09-13 17:28:35 +00:00
Michael Foord
c3f79373e8
Objects that compare equal automatically pass or fail assertAlmostEqual and assertNotAlmostEqual tests on unittest.TestCase. Issue 6567.
2009-09-13 16:40:02 +00:00
Kristján Valur Jónsson
e2a77980b6
issue 6275
...
Add an "exc_value" attribute to the _AssertRaisesContext context manager in the unittest package. This allows further tests on the exception that was raised after the context manager exits.
2009-08-27 22:20:21 +00:00
Benjamin Peterson
d7b0eebcae
split unittest.py into a package
2009-07-19 20:18:21 +00:00
Michael Foord
91dcd93beb
Move TestRunner initialisation into unittest.TestProgram.runTests. Fixes issue 6418.
2009-07-14 17:58:12 +00:00
Benjamin Peterson
6b0032f2c3
use assert* methods in test_unittest
2009-06-30 23:30:12 +00:00
Michael Foord
d53d085ada
Fix unittest discovery tests for Windows. Issue 6199
2009-06-05 14:14:34 +00:00
Michael Foord
dad7b7b1cb
Restore default testRunner argument in unittest.main to None. Issue 6177
2009-06-02 18:08:27 +00:00
Michael Foord
b4a81c838a
Add test discovery to unittest. Issue 6001.
2009-05-29 20:33:46 +00:00
Benjamin Peterson
176a56c69b
make class skipping decorators the same as skipping every test of the class
...
This removes ClassTestSuite and a good bit of hacks.
2009-05-25 00:48:58 +00:00
Michael Foord
a50af06931
Rename TestCase._result to _resultForDoCleanups to avoid potential clashes in TestCase subclasses. Issue 6072.
2009-05-21 22:57:02 +00:00
Michael Foord
5d31e057c5
Adds a verbosity keyword argument to unittest.main plus a minor fix allowing you to specify test modules / classes
...
from the command line.
Closes issue 5995.
Michael Foord
2009-05-11 17:59:43 +00:00
Michael Foord
07ef487a96
2009-05-02 22:43:34 +00:00
Michael Foord
e2fb98f467
Add addCleanup and doCleanups to unittest.TestCase.
...
Closes issue 5679.
Michael Foord
2009-05-02 20:15:05 +00:00
Benjamin Peterson
d7e8e3444f
don't let sys.argv be used in the tests
2009-05-02 16:24:37 +00:00
Michael Foord
829f6b8052
Adds an exit parameter to unittest.main(). If False main no longer
...
calls sys.exit.
Closes issue 3379.
Michael Foord
2009-05-02 11:43:06 +00:00