| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
accidentally derives from TestSuite instead of TestCase.
|
| |
|
|
|
|
| |
From SF patch #852334.
|
|
|
|
|
|
| |
of test failure output.
Irrelevant traceback levels are pruned from formatted traceback strings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
| |
given prefix rather than comparing a slice.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Hettinger in comments for issue 804115
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=804115&group_id=5470
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
loadTestsFromName to accept new-style classes too!
|
| |
|
|
|
|
|
| |
versions, since 'repr(new_style_class) != repr(classic_class)'.
Suggested by Jeremy Hylton.
|
|
|
|
| |
(Synched from pyunit CVS)
|
| |
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
- 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"
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Don't put paren in column 0 (to please font-lock mode).
Put space after comma in argument list.
|
|
|
|
| |
(Steve, can you add this to the PyUnit repository as well?)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
- Removed unused variable 'opts' in TestProgram.__init__ (thanks to PyChecker)
|
| |
|
|
|
|
|
|
| |
- TestCase.failureException defines the exception that indicates a test failure
- Docstrings for TestLoader class
- Added exc_info() hack back in
|
|
|
|
|
| |
* Fixed TestLoader.loadTestsFromName() for nested packages
* Corrected the command-line usage summary
|
| |
|
|
|
|
| |
changed accordingly.
|
|
|