[Python-checkins] CVS: python/dist/src/Lib/test test_long.py,1.3,1.4

Guido van Rossum python-dev@python.org
Mon, 10 Apr 2000 13:41:40 -0400 (EDT)


Update of /projects/cvsroot/python/dist/src/Lib/test
In directory eric:/projects/python/develop/guido/src/Lib/test

Modified Files:
	test_long.py 
Log Message:
Christian Tismer: added test to ensure that multiplication commutes.

[The test is in a slightly odd place, in test_division_2; but it
exercises the recent change to long_mult(), and that's all we really
ask for.  --GvR]


Index: test_long.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/test/test_long.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** test_long.py	1999/12/23 15:36:42	1.3
--- test_long.py	2000/04/10 17:41:37	1.4
***************
*** 78,81 ****
--- 78,83 ----
      q, r = divmod(x, y)
      q2, r2 = x/y, x%y
+     pab, pba = x*y, y*x
+     check(pab == pba, "multiplication does not commute for", x, y)
      check(q == q2, "divmod returns different quotient than / for", x, y)
      check(r == r2, "divmod returns different mod than % for", x, y)