diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-05-31 00:22:53 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-05-31 00:22:53 (GMT) |
commit | 15ac3110883c7f6e5cde5dd308baf178e666b985 (patch) | |
tree | fe022d19997a7d268cc52c13caab12f42298ce84 /Lib/test/test_abstract_numbers.py | |
parent | 371df0574034ad86b7dba9ba8e7d31a6fccde3db (diff) | |
download | cpython-15ac3110883c7f6e5cde5dd308baf178e666b985.zip cpython-15ac3110883c7f6e5cde5dd308baf178e666b985.tar.gz cpython-15ac3110883c7f6e5cde5dd308baf178e666b985.tar.bz2 |
add tests for negative with conjugate
Diffstat (limited to 'Lib/test/test_abstract_numbers.py')
-rw-r--r-- | Lib/test/test_abstract_numbers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_abstract_numbers.py b/Lib/test/test_abstract_numbers.py index 2a396cd..253e6f0 100644 --- a/Lib/test/test_abstract_numbers.py +++ b/Lib/test/test_abstract_numbers.py @@ -14,6 +14,7 @@ class TestNumbers(unittest.TestCase): self.assertEqual(7, int(7).real) self.assertEqual(0, int(7).imag) self.assertEqual(7, int(7).conjugate()) + self.assertEqual(-7, int(-7).conjugate()) self.assertEqual(7, int(7).numerator) self.assertEqual(1, int(7).denominator) @@ -24,6 +25,7 @@ class TestNumbers(unittest.TestCase): self.assertEqual(7.3, float(7.3).real) self.assertEqual(0, float(7.3).imag) self.assertEqual(7.3, float(7.3).conjugate()) + self.assertEqual(-7.3, float(-7.3).conjugate()) def test_complex(self): self.assertFalse(issubclass(complex, Real)) |