diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2001-12-29 14:31:46 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2001-12-29 14:31:46 (GMT) |
commit | 5a0f010c672c680eb0794a9e443f92b43e29301d (patch) | |
tree | d3d1ab5d2f06aada10b5e7fd6cf4674f959262f2 /Lib/test/test_complex.py | |
parent | fc37af85bf39f3f7fdd4f99cdc238930d55dd78f (diff) | |
download | cpython-5a0f010c672c680eb0794a9e443f92b43e29301d.zip cpython-5a0f010c672c680eb0794a9e443f92b43e29301d.tar.gz cpython-5a0f010c672c680eb0794a9e443f92b43e29301d.tar.bz2 |
SF Patch #497487 add test to compare conjugate of a complex number
Diffstat (limited to 'Lib/test/test_complex.py')
-rw-r--r-- | Lib/test/test_complex.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_complex.py b/Lib/test/test_complex.py index 65fccc3..1fa0ee0 100644 --- a/Lib/test/test_complex.py +++ b/Lib/test/test_complex.py @@ -1,4 +1,4 @@ -from test_support import TestFailed +from test_support import TestFailed, vereq from random import random # These tests ensure that complex math does the right thing; tests of @@ -63,6 +63,9 @@ for i in range(100): if complex(0.0, 0.0): raise TestFailed("complex(0.0, 0.0) should be false") +if vereq(complex(5.3, 9.8).conjugate(), 5.3-9.8j): + raise TestFailed("complex.conjugate() didn't work") + try: print int(5+3j) except TypeError: |