Пример #1
0
 def test_pow_iin(self):
     x = 10
     y = 2
     f1 = iobj.W_IntObject(x)
     f2 = iobj.W_IntObject(y)
     v = iobj.pow__Int_Int_None(self.space, f1, f2, self.space.w_None)
     assert v.intval == x ** y
     f1, f2 = [iobj.W_IntObject(i) for i in (10, 20)]
     assert self.space.w_OverflowError == (
                       self._unwrap_nonimpl(iobj.pow__Int_Int_None, self.space, f1, f2, self.space.w_None))
Пример #2
0
 def test_pow_iin(self):
     x = 10
     y = 2
     f1 = iobj.W_IntObject(x)
     f2 = iobj.W_IntObject(y)
     v = iobj.pow__Int_Int_None(self.space, f1, f2, self.space.w_None)
     assert v.intval == x**y
     f1, f2 = [iobj.W_IntObject(i) for i in (10, 20)]
     assert self.space.w_OverflowError == (self._unwrap_nonimpl(
         iobj.pow__Int_Int_None, self.space, f1, f2, self.space.w_None))