diff options
author | Fred Drake <fdrake@acm.org> | 2000-10-23 17:22:08 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-10-23 17:22:08 (GMT) |
commit | 004d5e6880940ddbb38460986ac62ee0f1bae97d (patch) | |
tree | 682e75e743f5c22206a65ac0262c03ce37e4fbee /Lib/test/test_math.py | |
parent | 2e6d25c5bbf3e2d4f18191c0836b5ed8f94dc850 (diff) | |
download | cpython-004d5e6880940ddbb38460986ac62ee0f1bae97d.zip cpython-004d5e6880940ddbb38460986ac62ee0f1bae97d.tar.gz cpython-004d5e6880940ddbb38460986ac62ee0f1bae97d.tar.bz2 |
Make reindent.py happy (convert everything to 4-space indents!).
Diffstat (limited to 'Lib/test/test_math.py')
-rw-r--r-- | Lib/test/test_math.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index b7fde0a..888d277 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -9,9 +9,9 @@ print 'math module, testing with eps', seps import math def testit(name, value, expected): - if abs(value-expected) > eps: - raise TestFailed, '%s returned %f, expected %f'%\ - (name, value, expected) + if abs(value-expected) > eps: + raise TestFailed, '%s returned %f, expected %f'%\ + (name, value, expected) print 'constants' testit('pi', math.pi, 3.1415926) @@ -85,9 +85,9 @@ testit('fmod(-10,1.5)', math.fmod(-10,1.5), -1) print 'frexp' def testfrexp(name, (mant, exp), (emant, eexp)): - if abs(mant-emant) > eps or exp <> eexp: - raise TestFailed, '%s returned %s, expected %s'%\ - (name, `mant, exp`, `emant,eexp`) + if abs(mant-emant) > eps or exp <> eexp: + raise TestFailed, '%s returned %s, expected %s'%\ + (name, `mant, exp`, `emant,eexp`) testfrexp('frexp(-1)', math.frexp(-1), (-0.5, 1)) testfrexp('frexp(0)', math.frexp(0), (0, 0)) @@ -116,9 +116,9 @@ testit('log10(10)', math.log10(10), 1) print 'modf' def testmodf(name, (v1, v2), (e1, e2)): - if abs(v1-e1) > eps or abs(v2-e2): - raise TestFailed, '%s returned %s, expected %s'%\ - (name, `v1,v2`, `e1,e2`) + if abs(v1-e1) > eps or abs(v2-e2): + raise TestFailed, '%s returned %s, expected %s'%\ + (name, `v1,v2`, `e1,e2`) testmodf('modf(1.5)', math.modf(1.5), (0.5, 1.0)) testmodf('modf(-1.5)', math.modf(-1.5), (-0.5, -1.0)) |