diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-24 08:14:36 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-03-24 08:14:36 (GMT) |
commit | bcc0db82dc9cb474d56a4cc63748583232d9524f (patch) | |
tree | 0107d20b29b61fc7dfd9626ee7257242f8cf6302 /Lib/test/test_complex.py | |
parent | ed483ba63b9c03845386976bccff5d95df5b570a (diff) | |
download | cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.zip cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.tar.gz cpython-bcc0db82dc9cb474d56a4cc63748583232d9524f.tar.bz2 |
Get rid of remnants of integer division
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r-- | Lib/test/test_complex.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py index 0d42bd2b..035f524 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -55,19 +55,15 @@ class ComplexTest(unittest.TestCase): if x != 0: q = z / x self.assertClose(q, y) - q = z.__div__(x) - self.assertClose(q, y) q = z.__truediv__(x) self.assertClose(q, y) if y != 0: q = z / y self.assertClose(q, x) - q = z.__div__(y) - self.assertClose(q, x) q = z.__truediv__(y) self.assertClose(q, x) - def test_div(self): + def test_truediv(self): simple_real = [float(i) for i in xrange(-5, 6)] simple_complex = [complex(x, y) for x in simple_real for y in simple_real] for x in simple_complex: @@ -84,7 +80,7 @@ class ComplexTest(unittest.TestCase): self.check_div(complex(random(), random()), complex(random(), random())) - self.assertRaises(ZeroDivisionError, complex.__div__, 1+1j, 0+0j) + self.assertRaises(ZeroDivisionError, complex.__truediv__, 1+1j, 0+0j) # FIXME: The following currently crashes on Alpha # self.assertRaises(OverflowError, pow, 1e200+1j, 1e200+1j) |