[Python-checkins] CVS: python/dist/src/Lib/test test_augassign.py,1.2,1.3
Jeremy Hylton
jhylton@users.sourceforge.net
Wed, 29 Aug 2001 10:50:24 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv3767
Modified Files:
test_augassign.py
Log Message:
Add tests for augmented floor division
Index: test_augassign.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_augassign.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_augassign.py 2000/10/23 17:22:07 1.2
--- test_augassign.py 2001/08/29 17:50:22 1.3
***************
*** 7,10 ****
--- 7,11 ----
x -= 8
x /= 2
+ x //= 1
x %= 12
x &= 2
***************
*** 20,23 ****
--- 21,25 ----
x[0] -= 8
x[0] /= 2
+ x[0] //= 2
x[0] %= 12
x[0] &= 2
***************
*** 33,36 ****
--- 35,39 ----
x[0] -= 8
x[0] /= 2
+ x[0] //= 1
x[0] %= 12
x[0] &= 2
***************
*** 129,132 ****
--- 132,152 ----
return self
+ def __floordiv__(self, val):
+ print "__floordiv__ called"
+ return self
+ def __ifloordiv__(self, val):
+ print "__ifloordiv__ called"
+ return self
+ def __rfloordiv__(self, val):
+ print "__rfloordiv__ called"
+ return self
+
+ def __truediv__(self, val):
+ print "__truediv__ called"
+ return self
+ def __itruediv__(self, val):
+ print "__itruediv__ called"
+ return self
+
def __mod__(self, val):
print "__mod__ called"
***************
*** 201,204 ****
--- 221,228 ----
1 / x
x /= 1
+
+ x // 1
+ 1 // x
+ x //= 1
x % 1