mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
#3912: document default for *places* arg.
This commit is contained in:
parent
2f3bd8364a
commit
4517323df8
1 changed files with 4 additions and 2 deletions
|
@ -595,7 +595,8 @@ failures.
|
||||||
TestCase.failUnlessAlmostEqual(first, second[, places[, msg]])
|
TestCase.failUnlessAlmostEqual(first, second[, places[, msg]])
|
||||||
|
|
||||||
Test that *first* and *second* are approximately equal by computing the
|
Test that *first* and *second* are approximately equal by computing the
|
||||||
difference, rounding to the given number of *places*, and comparing to zero.
|
difference, rounding to the given number of decimal *places* (default 7),
|
||||||
|
and comparing to zero.
|
||||||
Note that comparing a given number of decimal places is not the same as
|
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
|
comparing a given number of significant digits. If the values do not compare
|
||||||
equal, the test will fail with the explanation given by *msg*, or :const:`None`.
|
equal, the test will fail with the explanation given by *msg*, or :const:`None`.
|
||||||
|
@ -605,7 +606,8 @@ failures.
|
||||||
TestCase.failIfAlmostEqual(first, second[, places[, msg]])
|
TestCase.failIfAlmostEqual(first, second[, places[, msg]])
|
||||||
|
|
||||||
Test that *first* and *second* are not approximately equal by computing the
|
Test that *first* and *second* are not approximately equal by computing the
|
||||||
difference, rounding to the given number of *places*, and comparing to zero.
|
difference, rounding to the given number of decimal *places* (default 7),
|
||||||
|
and comparing to zero.
|
||||||
Note that comparing a given number of decimal places is not the same as
|
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
|
comparing a given number of significant digits. If the values do not compare
|
||||||
equal, the test will fail with the explanation given by *msg*, or :const:`None`.
|
equal, the test will fail with the explanation given by *msg*, or :const:`None`.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue