summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_complex.py
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2007-09-07 15:15:49 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2007-09-07 15:15:49 (GMT)
commit3404b3ce2acfc550571f06e70526ff75a34effeb (patch)
treef0d59f10296397ed947e970af4fdb8179c5aeef1 /Lib/test/test_complex.py
parentaaaef110dcb58ded6257512997ddf270828dc409 (diff)
downloadcpython-3404b3ce2acfc550571f06e70526ff75a34effeb.zip
cpython-3404b3ce2acfc550571f06e70526ff75a34effeb.tar.gz
cpython-3404b3ce2acfc550571f06e70526ff75a34effeb.tar.bz2
Check in some documentation tweaks for PEP 3141, add some tests, and implement
the promotion to complex on pow(negative, fraction).
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r--Lib/test/test_complex.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py
index b4082d9..5397ad6 100644
--- a/Lib/test/test_complex.py
+++ b/Lib/test/test_complex.py
@@ -1,13 +1,6 @@
import unittest, os
from test import test_support
-import warnings
-warnings.filterwarnings(
- "ignore",
- category=DeprecationWarning,
- message=".*complex divmod.*are deprecated"
-)
-
from random import random
# These tests ensure that complex math does the right thing
@@ -108,6 +101,7 @@ class ComplexTest(unittest.TestCase):
# % is no longer supported on complex numbers
self.assertRaises(TypeError, (1+1j).__mod__, 0+0j)
self.assertRaises(TypeError, lambda: (3.33+4.43j) % 0)
+ self.assertRaises(TypeError, (1+1j).__mod__, 4.3j)
def test_divmod(self):
self.assertRaises(TypeError, divmod, 1+1j, 1+0j)