[Python-checkins] python/dist/src/Lib/test test_complex.py, 1.12, 1.13

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Tue Aug 5 09:34:36 EDT 2003


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

Modified Files:
	test_complex.py 
Log Message:
Check both __div__ and __truediv__ in division tests.
(From SF patch #543867)


Index: test_complex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_complex.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** test_complex.py	15 Jul 2003 18:47:27 -0000	1.12
--- test_complex.py	5 Aug 2003 15:34:34 -0000	1.13
***************
*** 1,3 ****
! import unittest, os
  from test import test_support
  
--- 1,3 ----
! import unittest, os, math
  from test import test_support
  
***************
*** 56,61 ****
--- 56,69 ----
              q = z / x
              self.assertClose(q, y)
+             q = z.__div__(x)
+             self.assertClose(q, y)
+             q = z.__truediv__(x)
+             self.assertClose(q, y)
          if y != 0:
              q = z / y
+             self.assertClose(q, x)
+             q = z.__div__(y)
+             self.assertClose(q, x)
+             q = z.__truediv__(y)
              self.assertClose(q, x)
  





More information about the Python-checkins mailing list