Ezio Melotti
85ee3e1b1e
Use correct assert* methods in the examples.
2010-02-04 20:06:38 +00:00
Michael Foord
e70c72c06b
Minor modification to unittest documentation.
2010-01-31 19:59:26 +00:00
Ezio Melotti
7b4e02c862
#7765 : typos
2010-01-27 20:25:11 +00:00
Ezio Melotti
5afe42b69b
remove wrong markup
2010-01-16 19:36:42 +00:00
Ezio Melotti
062d2b52f3
#7388 : "python".capitalize() in the Doc
2009-12-19 22:41:49 +00:00
Georg Brandl
f895cf5d33
#7031 : Add TestCase.assertIsInstance and negated method.
2009-10-01 20:59:31 +00:00
Michael Foord
17565e5b7b
Documentation improvement for load_tests protocol in unittest. Issue 6515.
2009-09-27 20:08:23 +00:00
Michael Foord
dc0460a309
Remove an extraneous space in unittest documentation.
2009-09-13 19:08:18 +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
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
Ezio Melotti
c2f5a595ba
Fixed defaultTestCase -> defaultTestResult
2009-06-30 22:51:06 +00:00
Georg Brandl
d198b76d36
Fix markup.
2009-05-31 14:15:25 +00:00
Georg Brandl
2fcd17324d
Rewrap a few long lines.
2009-05-30 10:45:40 +00:00
Raymond Hettinger
b09f198362
Move the basic examples section back to the beginning.
2009-05-29 21:20:41 +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
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
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
Georg Brandl
9bc668251f
#5848 : small unittest doc patch.
2009-04-27 17:04:23 +00:00
Georg Brandl
16a57f6a34
Demote warnings to notices where appropriate, following the goal that as few "red box" warnings
...
should clutter the docs as possible. Part 1: stuff that gets merged to Py3k.
2009-04-27 15:29:09 +00:00
Georg Brandl
64034bbf84
#5834 : use "failure" instead of "error" because the two have different meanings in unittest context.
2009-04-25 14:51:31 +00:00
Andrew M. Kuchling
5963185b23
Typo fixes
2009-04-09 11:23:36 +00:00
Michael Foord
f2dfef1637
Adding assertIs and assertIsNot methods to unittest.TestCase
...
Issue #2578
2009-04-05 19:19:28 +00:00
Michael Foord
345b2fe21e
Better exception messages for unittest assert methods.
...
- unittest.assertNotEqual() now uses the inequality operator (!=) instead
of the equality operator.
- Default assertTrue and assertFalse messages are now useful.
- TestCase has a longMessage attribute. This defaults to False, but if set to True
useful error messages are shown in addition to explicit messages passed to assert methods.
Issue #5663
2009-04-02 03:20:38 +00:00
Gregory P. Smith
65ff00559a
Issue an actual PendingDeprecationWarning for the TestCase.fail* methods.
...
Document the deprecation.
2009-03-31 19:59:14 +00:00
Gregory P. Smith
2839985c7e
The unittest.TestCase.assertEqual() now displays the differences in lists,
...
tuples, dicts and sets on failure.
Many new handy type and comparison specific assert* methods have been added
that fail with error messages actually useful for debugging. Contributed in
by Google and completed with help from mfoord and GvR at PyCon 2009 sprints.
Discussion lives in http://bugs.python.org/issue2578 .
2009-03-31 16:54:10 +00:00
Benjamin Peterson
097aafdde6
fix consistency
2009-03-29 03:39:58 +00:00
Benjamin Peterson
7233acc5c5
stop the versionchanged directive from hiding the docs
2009-03-29 03:31:40 +00:00
Benjamin Peterson
be76d4caed
a more realistic example
2009-03-29 03:16:57 +00:00
Benjamin Peterson
47d9738b0f
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
2009-03-26 20:05:50 +00:00
Raymond Hettinger
21b617bd98
Add links to related resources.
2009-03-24 00:17:11 +00:00
Benjamin Peterson
31b7806ee8
forgot to document that setUp can be skipped (silly me...)
2009-03-23 23:13:36 +00:00
Benjamin Peterson
99721e0c44
refactor unittest docs
2009-03-23 23:10:14 +00:00
Benjamin Peterson
cb2b0e45d4
comply with the evilJavaNamingScheme for attribute names
...
It seems my love of PEP 8 overrode the need for consistentcy
2009-03-23 22:29:45 +00:00
Benjamin Peterson
692428e77f
implement test skipping and expected failures
...
patch by myself #1034053
2009-03-23 21:50:21 +00:00
Georg Brandl
c62ef8b4d9
Remove trailing whitespace.
2009-01-03 20:55:06 +00:00
Antoine Pitrou
cc928de44f
wrong version number in doc changes committed in r67979
2008-12-28 14:24:29 +00:00
Antoine Pitrou
697ca3d0cb
Issue #4444 : Allow assertRaises() to be used as a context handler.
2008-12-28 14:09:36 +00:00
Georg Brandl
4517323df8
#3912 : document default for *places* arg.
2008-09-21 07:15:59 +00:00
Georg Brandl
bc04346446
#2757 : Remove spare newline.
2008-05-04 15:45:05 +00:00
Georg Brandl
c557db5268
#2249 : document assertTrue and assertFalse.
2008-03-09 15:11:39 +00:00
Georg Brandl
586edab279
#1467 : fix documentation for TestResult.add{Error,Failure}.
2007-11-24 11:39:13 +00:00
Georg Brandl
8ec7f65613
Move the 2.6 reST doc tree in place.
2007-08-15 14:28:01 +00:00