Commit e07644d7 authored by Jeremy Hylton's avatar Jeremy Hylton

Add tests for augmented floor division

parent 542ab232
......@@ -25,6 +25,9 @@ __imul__ called
__div__ called
__rdiv__ called
__idiv__ called
__floordiv__ called
__rfloordiv__ called
__ifloordiv__ called
__mod__ called
__rmod__ called
__imod__ called
......
......@@ -6,6 +6,7 @@ x *= 2
x **= 2
x -= 8
x /= 2
x //= 1
x %= 12
x &= 2
x |= 5
......@@ -19,6 +20,7 @@ x[0] *= 2
x[0] **= 2
x[0] -= 8
x[0] /= 2
x[0] //= 2
x[0] %= 12
x[0] &= 2
x[0] |= 5
......@@ -32,6 +34,7 @@ x[0] *= 2
x[0] **= 2
x[0] -= 8
x[0] /= 2
x[0] //= 1
x[0] %= 12
x[0] &= 2
x[0] |= 5
......@@ -128,6 +131,23 @@ class testall:
print "__idiv__ called"
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"
def __rmod__(self, val):
......@@ -201,6 +221,10 @@ x / 1
1 / x
x /= 1
x // 1
1 // x
x //= 1
x % 1
1 % x
x %= 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment