def check_division(self, x, y):
        eq = self.assertEqual
        q, r = divmod(x, y)
        q2, r2 = x//y, x%y
        pab, pba = x*y, y*x
        eq(pab, pba, Frm("multiplication does not commute for %r and %r", x, y))
        eq(q, q2, Frm("divmod returns different quotient than / for %r and %r", x, y))
        eq(r, r2, Frm("divmod returns different mod than %% for %r and %r", x, y))
        eq(x, q*y + r, Frm("x != q*y + r after divmod on x=%r, y=%r", x, y))
        if y > 0:
            self.assert_(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y))
        else:
            self.assert_(r <= 0 < y, Frm("bad mod from divmod on %r and %r", x, y))
dataset/ETHPy150Open anandology/pyjamas/examples/libtest/LongTypeTest.py/LongTypeTest.check_division/swapped operands of `<`