def test_mul(self): x = 2 y = 3 f1 = iobj.W_IntObject(x) f2 = iobj.W_IntObject(y) result = iobj.mul__Int_Int(self.space, f1, f2) assert result.intval == x*y x = -sys.maxint-1 y = -1 f1 = iobj.W_IntObject(x) f2 = iobj.W_IntObject(y) assert self.space.w_OverflowError == ( self._unwrap_nonimpl(iobj.mul__Int_Int, self.space, f1, f2))
def test_mul(self): x = 2 y = 3 f1 = iobj.W_IntObject(x) f2 = iobj.W_IntObject(y) result = iobj.mul__Int_Int(self.space, f1, f2) assert result.intval == x * y x = -sys.maxint - 1 y = -1 f1 = iobj.W_IntObject(x) f2 = iobj.W_IntObject(y) assert self.space.w_OverflowError == (self._unwrap_nonimpl( iobj.mul__Int_Int, self.space, f1, f2))