summaryrefslogtreecommitdiffstats
path: root/Lib/unittest.py
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of dict.has_key(). Boy this has a lot of repercussions!Guido van Rossum2006-08-181-1/+1
| | | | | | Not all code has been fixed yet; this is just a checkpoint... The C API still has PyDict_HasKey() and _HasKeyString(); not sure if I want to change those just yet.
* Patch #1388073: Make unittest.TestCase easier to subclassGeorg Brandl2006-01-201-13/+13
|
* Reduce the usage of the types module.Raymond Hettinger2005-02-071-1/+1
|
* SF bug #1078905: Docs for unittest run() methods are misleadingRaymond Hettinger2004-12-041-4/+5
|
* Patch #1061904 / bug #878275: give a nicer error message when someoneJohannes Gijsbers2004-11-071-0/+2
| | | | accidentally derives from TestSuite instead of TestCase.
* Added an __iter__ method for test suites.Jim Fulton2004-08-281-0/+3
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-4/+4
| | | | From SF patch #852334.
* Variation of Thomas Heller's patch (722638) for improving readabilitySteve Purcell2003-12-061-10/+26
| | | | | | of test failure output. Irrelevant traceback levels are pruned from formatted traceback strings.
* Another instance of the same typo.Steve Purcell2003-10-261-2/+2
|
* Incorporated patch 819077, from George Yoshida:Steve Purcell2003-10-261-7/+6
| | | | | | | | | | | | | * Fixed typo in docstring for 'failUnlessAlmostEqual()' * Removed unnecessary use of 'float()' for time values. * Removed apparently unnecessary import of unittest. At some point in the distant past I believe it was necessary otherwise the 'TestCase' that a module saw was not the same as the 'TestCase' seen within 'unittest', and the user's TestCase subclasses were not recognised as subclasses of the TestCase seen within unittest. Seems not to be necessary now.
* Fixed bug introduced in revision 1.27Armin Rigo2003-10-241-1/+1
|
* Removed redundant 'return' statement. (Issue 813159)Steve Purcell2003-09-301-2/+1
|
* Topical change: use 'startswith()' to identify test methods with aSteve Purcell2003-09-231-2/+2
| | | | given prefix rather than comparing a slice.
* - Fixed loading of tests by name when name refers to unboundSteve Purcell2003-09-221-40/+58
| | | | | | | | | | | | method (PyUnit issue 563882, thanks to Alexandre Fayolle) - Ignore non-callable attributes of classes when searching for test method names (PyUnit issue 769338, thanks to Seth Falcon) - New assertTrue and assertFalse aliases for comfort of JUnit users - Automatically discover 'runTest()' test methods (PyUnit issue 469444, thanks to Roeland Rengelink) - Dropped Python 1.5.2 compatibility, merged appropriate shortcuts from Python CVS; should work with Python >= 2.1. - Removed all references to string module by using string methods instead
* Explicitly define public symbols via __all__: see discussion with RaymondSteve Purcell2003-09-151-0/+10
| | | | | Hettinger in comments for issue 804115 https://sourceforge.net/tracker/?func=detail&atid=105470&aid=804115&group_id=5470
* SF bug #804115: bad argument handling(unittest.py)Raymond Hettinger2003-09-131-2/+2
|
* delete unused local variable (pychecker caught)Skip Montanaro2003-07-131-1/+1
|
* SF bug #715145: unittest.py still uses != in failUnlessEqualRaymond Hettinger2003-04-041-2/+2
|
* Get rid of many apply() calls.Guido van Rossum2003-02-271-3/+3
|
* Incorporate Skip's suggestion to use SciPy's validation test nearRaymond Hettinger2002-12-291-0/+28
| | | | | | equality. Note, there is another flavor that compares to a given number of significant digits rather than decimal places. If there is a demand, that could be added at a later date.
* Now that TestCase is a new-style class, change loadTestsFromModule andGuido van Rossum2002-09-301-2/+4
| | | | loadTestsFromName to accept new-style classes too!
* Add a missing call to _strclass().Jeremy Hylton2002-08-131-1/+1
|
* Fix to ensure consistent 'repr' and 'str' results between PythonSteve Purcell2002-08-091-7/+10
| | | | | versions, since 'repr(new_style_class) != repr(classic_class)'. Suggested by Jeremy Hylton.
* Add module-wide "__metaclass__ = type", as requested by Jim Fulton.Steve Purcell2002-08-081-1/+4
| | | | (Synched from pyunit CVS)
* Fix printing plural (s or "").Neal Norwitz2002-05-311-1/+1
|
* Munge the RCS keywords to avoid updates, so the version number matches thatFred Drake2002-05-211-1/+1
| | | | | | of the PyUNIT version of the same file. This helps people understand that this version is the same as the version from the independent PyUNIT release (confusion was indicated on the PyUNIT mailing list).
* Synch with pyunit CVS:Steve Purcell2001-12-171-4/+4
| | | | | | - Adds Fred's patch 487662: "Better error message for assertEqual" - Removed small portion of code unused after Guido's patch 490119: "Don't treat ^C as error"
* In unconditional except clauses, don't catch KeyboardInterrupt -- it'sGuido van Rossum2001-12-071-0/+6
| | | | | | | annoying that often you have to hit ^C numerous times before it works. The solution: before the "except:" clause, insert "except KeyboardInterrupt: raise". This propagates KeyboardInterrupt out, stopping the test in its tracks.
* A few formatting nits:Jeremy Hylton2001-10-221-5/+5
| | | | | Don't put paren in column 0 (to please font-lock mode). Put space after comma in argument list.
* Add missing period in docstring.Fred Drake2001-09-061-1/+1
| | | | (Steve, can you add this to the PyUnit repository as well?)
* Changed TestResult to store only the text representation of an error.Steve Purcell2001-09-061-10/+15
| | | | | | | | | | | | | | | | | | | | This patch is similar to that proposed by Jeremy. The proposed patch altered the interface of TestResult such that it would be passed the error information as a string rather than an exc_info() tuple. The implemented change leaves the interface untouched so that TestResults are still passed the tracebacks, but stor them in stringified form for later reporting. Notes: - Custom subclasses of TestResult written by users should be unaffected. - The existing 'unittestgui.py' will still work with this module after the change. - Support can later be added to pop into the debugger when an error occurs; this support should be added to a TestRunner rather than to TestCase itself, which this change will enable. (Jeremy, Fred, Guido: Thanks for all the feedback)
* Merged in bugfix from PyUnit CVS for problem reported by Gary Todd.Steve Purcell2001-08-081-3/+4
| | | | | | | | | If 'unittest.py' was run from the command line with the name of a test case class as a parameter, it failed with an ugly error. (Which was a shame, because the documentation says you can do that.) The problem was the old 'is the class X that you imported from me the same as my class X?' gotcha.
* patch 418489 from Andrew Dalke for string format bugSteve Purcell2001-05-101-1/+1
|
* - Typo in message for TestCase.failIfEqual()Steve Purcell2001-04-151-2/+1
| | | | - Removed unused variable 'opts' in TestProgram.__init__ (thanks to PyChecker)
* Whitespace normalization.Tim Peters2001-04-131-1/+1
|
* - New fail*() methods, and comprehensive set of assert*() synonymsSteve Purcell2001-04-121-28/+63
| | | | | | - TestCase.failureException defines the exception that indicates a test failure - Docstrings for TestLoader class - Added exc_info() hack back in
* * Remove exc_info() kludge -- it actually messed up the Jython outputSteve Purcell2001-04-091-17/+13
| | | | | * Fixed TestLoader.loadTestsFromName() for nested packages * Corrected the command-line usage summary
* Whitespace normalization.Tim Peters2001-03-291-7/+7
|
* Updated to latest PyUnit version (1.31 in PyUnit CVS); test_support.pySteve Purcell2001-03-221-246/+238
| | | | changed accordingly.
* The unittest module from PyUNIT, by Steve Purcell.Fred Drake2001-03-211-0/+689