PythonExtra/tests/basics/int_divmod.py
Paul Sokolovsky 3ab6aa3a6d tests/basic: Split tests into working with small ints and not working.
Tests which don't work with small ints are suffixed with _intbig.py. Some
of these may still work with long long ints and need to be reclassified
later.
2017-03-04 00:13:27 +03:00

8 lines
202 B
Python

# test integer floor division and modulo
# test all combination of +/-/0 cases
for i in range(-2, 3):
for j in range(-4, 5):
if j != 0:
print(i, j, i // j, i % j, divmod(i, j))