diff options
| author | Claude Paroz <claude@2xlibre.net> | 2014-10-23 11:16:17 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-10-23 11:16:17 +0200 |
| commit | bc6caa5d456a51be88c5382f40f1733d8258b970 (patch) | |
| tree | e4b407c7a8540cf38954c83a56701109a8cbeb27 | |
| parent | ef9e3c5ed8bcbc345c09ec89c8e8a0ab6d3f8fab (diff) | |
Made a doctest compatible with Python 2
That test might not always execute, but can be executed when the
parent test label is explicitely given.
| -rw-r--r-- | tests/test_discovery_sample/doctests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_discovery_sample/doctests.py b/tests/test_discovery_sample/doctests.py index 4cc2a2105b..6d9403442c 100644 --- a/tests/test_discovery_sample/doctests.py +++ b/tests/test_discovery_sample/doctests.py @@ -9,8 +9,8 @@ def factorial(n): >>> [factorial(n) for n in range(6)] [1, 1, 2, 6, 24, 120] - >>> factorial(30) - 265252859812191058636308480000000 + >>> factorial(30) # doctest: +ELLIPSIS + 265252859812191058636308480000000... >>> factorial(-1) Traceback (most recent call last): ... @@ -21,8 +21,8 @@ def factorial(n): Traceback (most recent call last): ... ValueError: n must be exact integer - >>> factorial(30.0) - 265252859812191058636308480000000 + >>> factorial(30.0) # doctest: +ELLIPSIS + 265252859812191058636308480000000... It must also not be ridiculously large: >>> factorial(1e100) |
