]> granicus.if.org Git - python/commitdiff
Fiddle test_augassign so it passes under -Qnew.
authorTim Peters <tim.peters@gmail.com>
Tue, 11 Dec 2001 19:20:15 +0000 (19:20 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 11 Dec 2001 19:20:15 +0000 (19:20 +0000)
Lib/test/test_augassign.py

index c372b9a695acc2715f0045ca58bd8a1502c4a65e..8a8f00d88d6c0883c73c33ab0175bcb1b97f5ec9 100644 (file)
@@ -217,9 +217,16 @@ x * 1
 1 * x
 x *= 1
 
-x / 1
-1 / x
-x /= 1
+if 1/2 == 0:
+    x / 1
+    1 / x
+    x /= 1
+else:
+    # True division is in effect, so "/" doesn't map to __div__ etc;
+    # but the canned expected-output file requires that those get called.
+    x.__div__(1)
+    x.__rdiv__(1)
+    x.__idiv__(1)
 
 x // 1
 1 // x