Update of /cvsroot/python/python/dist/src/Doc/lib In directory sc8-pr-cvs1:/tmp/cvs-serv17844/Doc/lib Modified Files: libunittest.tex Log Message: Incorporate Skip's suggestion to use SciPy's validation test near 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. Index: libunittest.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libunittest.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** libunittest.tex 15 Dec 2002 13:14:22 -0000 1.11 --- libunittest.tex 29 Dec 2002 17:59:24 -0000 1.12 *************** *** 502,505 **** --- 502,529 ---- \end{methoddesc} + \begin{methoddesc}[TestCase]{assertAlmostEqual}{first, second\optional{, + places\optional{, msg}}} + \methodline{failUnlessAlmostEqual}{first, second\optional{, + places\optional{, msg}}} + Test that \var{first} and \var{second} are approximately equal + by computing the difference, rounding to the given number of \var{places}, + and comparing to zero. Note that comparing a given number of decimal places + is not the same as comparing a given number of significant digits. + If the values do not compare equal, the test will fail with the explanation + given by \var{msg}, or \code{None}. + \end{methoddesc} + + \begin{methoddesc}[TestCase]{assertNotAlmostEqual}{first, second\optional{, + places\optional{, msg}}} + \methodline{failIfAlmostEqual}{first, second\optional{, + places\optional{, msg}}} + Test that \var{first} and \var{second} are not approximately equal + by computing the difference, rounding to the given number of \var{places}, + and comparing to zero. Note that comparing a given number of decimal places + is not the same as comparing a given number of significant digits. + If the values do not compare equal, the test will fail with the explanation + given by \var{msg}, or \code{None}. + \end{methoddesc} + \begin{methoddesc}[TestCase]{assertRaises}{exception, callable, \moreargs} \methodline{failUnlessRaises}{exception, callable, \moreargs}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4