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.
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).
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.
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.