The following patch, in addition to widespread typo and
grammar corrections and style improvements, fixes the
following errors/irritations:
* Removes a link to the PyUnit website (pyunit.sf.net)
and replaces use of the PyUnit name with unittest. The
module has not been known by this name for years.
* TextTestRunner is documented varyingly as printing to
stdout and stderr; the latter is correct. This is now
fixed.
* Several usages of the deprecated makeSuite() function
have been replaced with TestLoader()-based examples.
* One needlessly-complex TestSuite construction example
has been simplified to something understandable.
* It is stated that classes that implement TestCase's
interface can be used with unittest, even if they do
not subclass TestCase. This is false, contradicting
several other lines of documentation. Moreover, it does
not reflect reality: unittest relies heavily on
inheritance from TestCase to determine what is and what
is not a test case.
* It has now been made explicit which methods TestSuite
shares with TestCase. Previously, this had been left as
an exercise for the reader.
* TestLoader.loadTestsFromName() was not documented as
being able to handle a name that resolves to a
TestSuite. It can, and this capability is now documented.
* The documentation implied that
TestLoader.sortTestMethodsUsing affects only
TestLoader.getTestCaseNames(). This is inaccurate; it
is now explicit that it also affects all
TestLoader.loadTestsFrom*() methods.
* Make it explicit that TestLoader.suiteClass and
TestLoader.testMethodPrefix affect getTestCaseNames()
and all loadTestsFrom*() methods.
|