[Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.6,1.7

Neal Norwitz nnorwitz@users.sourceforge.net
Sat, 29 Dec 2001 06:31:48 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv26077

Modified Files:
	test_complex.py 
Log Message:
SF Patch #497487 add test to compare conjugate of a complex number

Index: test_complex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_complex.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_complex.py	2001/12/29 01:02:21	1.6
--- test_complex.py	2001/12/29 14:31:46	1.7
***************
*** 1,3 ****
! from test_support import TestFailed
  from random import random
  
--- 1,3 ----
! from test_support import TestFailed, vereq
  from random import random
  
***************
*** 63,66 ****
--- 63,69 ----
  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: