[Python-checkins] cpython: add tests for negative with conjugate
benjamin.peterson
python-checkins at python.org
Tue May 31 02:25:44 CEST 2011
http://hg.python.org/cpython/rev/6401ca1ee959
changeset: 70543:6401ca1ee959
parent: 70525:d615eb7bce33
user: Benjamin Peterson <benjamin at python.org>
date: Mon May 30 19:22:53 2011 -0500
summary:
add tests for negative with conjugate
files:
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
--- a/Lib/test/test_abstract_numbers.py
+++ b/Lib/test/test_abstract_numbers.py
@@ -14,6 +14,7 @@
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 @@
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))
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list