summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2011-05-03 20:13:40 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2011-05-03 20:13:40 (GMT)
commit5bc7a44477210873d181e775ab7a012992dbd760 (patch)
treee5fa8a9a0c1057c27daa0097796a99c02e83fd22 /Lib/test
parent0cc28b7a34259488c091c1bc45cca2e210928baf (diff)
downloadcpython-5bc7a44477210873d181e775ab7a012992dbd760.zip
cpython-5bc7a44477210873d181e775ab7a012992dbd760.tar.gz
cpython-5bc7a44477210873d181e775ab7a012992dbd760.tar.bz2
test_math.py: Use correct signs on zeros for expected fmod results.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_math.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 5ae98e1..1bbc22d 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -456,12 +456,12 @@ class MathTests(unittest.TestCase):
def testFmod(self):
self.assertRaises(TypeError, math.fmod)
- self.ftest('fmod(10,1)', math.fmod(10,1), 0)
- self.ftest('fmod(10,0.5)', math.fmod(10,0.5), 0)
- self.ftest('fmod(10,1.5)', math.fmod(10,1.5), 1)
- self.ftest('fmod(-10,1)', math.fmod(-10,1), 0)
- self.ftest('fmod(-10,0.5)', math.fmod(-10,0.5), 0)
- self.ftest('fmod(-10,1.5)', math.fmod(-10,1.5), -1)
+ self.ftest('fmod(10, 1)', math.fmod(10, 1), 0.0)
+ self.ftest('fmod(10, 0.5)', math.fmod(10, 0.5), 0.0)
+ self.ftest('fmod(10, 1.5)', math.fmod(10, 1.5), 1.0)
+ self.ftest('fmod(-10, 1)', math.fmod(-10, 1), -0.0)
+ self.ftest('fmod(-10, 0.5)', math.fmod(-10, 0.5), -0.0)
+ self.ftest('fmod(-10, 1.5)', math.fmod(-10, 1.5), -1.0)
self.assertTrue(math.isnan(math.fmod(NAN, 1.)))
self.assertTrue(math.isnan(math.fmod(1., NAN)))
self.assertTrue(math.isnan(math.fmod(NAN, NAN)))