From: Tim Peters Date: Tue, 11 Dec 2001 19:20:15 +0000 (+0000) Subject: Fiddle test_augassign so it passes under -Qnew. X-Git-Tag: v2.2.1c1~425 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e93e47721582804e0d697d851eb7e6e6b6544be2;p=python Fiddle test_augassign so it passes under -Qnew. --- diff --git a/Lib/test/test_augassign.py b/Lib/test/test_augassign.py index c372b9a695..8a8f00d88d 100644 --- a/Lib/test/test_augassign.py +++ b/Lib/test/test_augassign.py @@ -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