test_long.py | 9 class Frm(object):
127 eq(pab, pba, Frm("multiplication does not commute for %r and %r", x, y))
128 eq(q, q2, Frm("divmod returns different quotient than / for %r and %r", x, y))
129 eq(r, r2, Frm("divmod returns different mod than %% for %r and %r", x, y))
130 eq(x, q*y + r, Frm("x != q*y + r after divmod on x=%r, y=%r", x, y))
132 self.assertTrue(0 <= r < y, Frm("bad mod from divmod on %r and %r", x, y))
134 self.assertTrue(y < r <= 0, Frm("bad mod from divmod on %r and %r", x, y))
195 Frm("bad result for a*b: a=%r, b=%r, x=%r, y=%r", a, b, x, y))
199 eq(x & 0, 0, Frm("x & 0 != 0 for x=%r", x))
200 eq(x | 0, x, Frm("x | 0 != x for x=%r", x)) [all...] |