Michael Foord
f6ff26c486
unittest.result.TestResult does not create its buffers until they're used. It uses StringIO not cStringIO. Issue 8333.
2010-04-07 23:04:22 +00:00
Michael Foord
c1bf677e28
Fix module directory finding logic for dotted paths in unittest test discovery.
2010-04-06 23:18:16 +00:00
Raymond Hettinger
bb006cf26c
Add tests for cmp_to_key.
...
Adopt PEP 8 compliant function name.
Factor-out existing uses cmp_to_key.
Update documentation to use internal pointers instead of external resource.
2010-04-04 21:45:01 +00:00
Michael Foord
3dd9f40d6d
Minor tweak to unittest command line usage message
2010-04-03 15:20:00 +00:00
Michael Foord
d43b63fed3
Adding -b command line option to the unittest usage message.
2010-04-03 14:52:18 +00:00
Michael Foord
93232660bb
Another attempt at a fix for unittest.test.test_result for windows line endings
2010-04-03 02:33:55 +00:00
Michael Foord
9b4ee12e89
Cross platform unittest.TestResult newline handling when buffering stdout / stderr.
2010-04-03 02:21:39 +00:00
Michael Foord
931190b4f5
Support dotted module names for test discovery paths in unittest. Issue 7780.
2010-04-03 01:15:21 +00:00
Brian Curtin
e5aa886b44
Implement #1220212 . Add os.kill support for Windows.
...
os.kill takes one of two newly added signals, CTRL_C_EVENT and
CTRL_BREAK_EVENT, or any integer value. The events are a special case
which work with subprocess console applications which implement a
special console control handler. Any other value but those two will
cause os.kill to use TerminateProcess, outright killing the process.
This change adds win_console_handler.py, which is a script to implement
SetConsoleCtrlHandler and applicable handler function, using ctypes.
subprocess also gets another attribute which is a necessary flag to
creationflags in Popen in order to send the CTRL events.
2010-04-02 23:26:06 +00:00
Michael Foord
a04c7a0f16
Issue #8038 : Addition of unittest.TestCase.assertNotRegexpMatches
2010-04-02 22:55:59 +00:00
Michael Foord
25d7976014
unittest tests no longer replace the sys.stdout put in place by regrtest
2010-04-02 22:30:56 +00:00
Michael Foord
58c1e78806
TestResult stores original sys.stdout and tests no longer use sys.__stdout__ (etc) in tests for unittest -b command line option
2010-04-02 22:08:29 +00:00
Michael Foord
5637f04a94
Addition of -b command line option to unittest for buffering stdout and stderr during test runs.
2010-04-02 21:42:47 +00:00
Michael Foord
e6410c536c
Backport of weakref.WeakSet and tests from Python 3.
2010-03-29 20:04:23 +00:00
Michael Foord
a7e08fe3f8
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.
2010-03-27 19:10:11 +00:00
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
Michael Foord
ff889396a8
A fix for running unittest tests on platforms without the audioop module (e.g. jython and IronPython)
2010-03-27 12:55:19 +00:00
Michael Foord
fa2f1cdcbb
Addition of -c command line option to unittest, to handle ctrl-c during a test run more elegantly
2010-03-26 03:18:31 +00:00
Michael Foord
ee627883a7
Move a support TestCase out of the main namespace in unittest.test.test_suite
2010-03-26 02:53:56 +00:00
Michael Foord
95ac82bfc6
Remove incorrect docstring in unittest.test
2010-03-26 00:03:38 +00:00
Michael Foord
35b3792ed3
Turn unittest tests into a package
2010-03-25 23:56:33 +00:00
Michael Foord
eef159bd17
Correct usage message displayed for python -m unittest -h
2010-03-22 02:49:08 +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
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
Florent Xicluna
4a0f8b89f6
Silence more py3k warnings in unittest.case.
2010-03-21 10:50:44 +00:00
Michael Foord
8cb253f8d6
Change order of arguments in a unittest function.
2010-03-21 00:55:58 +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
08611b5e55
Remove accidental print statement from last commit.
2010-03-07 23:16:20 +00:00
Michael Foord
a715255a27
Fix accidental name rebinding in unittest py3k warning filtering.
2010-03-07 23:10:36 +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
Florent Xicluna
1f3b4e12e8
Fix some py3k warnings in the standard library.
2010-03-07 12:14:25 +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
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
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
e5e7696458
Adding TextTestResult to unittest.__all__
2010-02-11 14:12:07 +00:00
Michael Foord
67dfc77dfd
Remove deprecation on assert_. It is used too frequently.
2010-02-10 14:31:30 +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
Ezio Melotti
cd4f657809
Fix exc_value -> exception in docstring
2010-02-08 21:52:08 +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
Georg Brandl
b0eb4d3eb1
Use "regexp" consistently.
2010-02-07 11:34:15 +00:00
Michael Foord
0877060f86
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
2010-02-06 00:22:26 +00:00
Michael Foord
757cc4d15f
Correction to docstring correction.
2010-02-05 23:22:37 +00:00
Michael Foord
d0edec38ce
Improving docstrings in unittest.TestCase
2010-02-05 22:55:09 +00:00