[Python-checkins] python/dist/src/Lib/test test_b1.py,1.52,1.53

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Thu, 29 Aug 2002 07:22:53 -0700


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

Modified Files:
	test_b1.py 
Log Message:
complex() was the only numeric constructor that created a new instance
when given its own type as an argument.


Index: test_b1.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** test_b1.py	14 Aug 2002 18:38:27 -0000	1.52
--- test_b1.py	29 Aug 2002 14:22:51 -0000	1.53
***************
*** 141,144 ****
--- 141,148 ----
  if complex("1j") != 1j: raise TestFailed, 'complex("1j")'
  
+ c = 3.14 + 1j
+ if complex(c) is not c: raise TestFailed, 'complex(3.14+1j) changed identity'
+ del c
+ 
  try: complex("1", "1")
  except TypeError: pass