diff options
| author | Benjamin Peterson <benjamin@python.org> | 2011-05-30 19:22:53 -0500 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2011-05-30 19:22:53 -0500 |
| commit | 15ac3110883c7f6e5cde5dd308baf178e666b985 (patch) | |
| tree | fe022d19997a7d268cc52c13caab12f42298ce84 | |
| parent | 371df0574034ad86b7dba9ba8e7d31a6fccde3db (diff) | |
| download | cpython-git-15ac3110883c7f6e5cde5dd308baf178e666b985.tar.gz | |
add tests for negative with conjugate
| -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 2a396cdad1..253e6f082c 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)) |
