@@ -985,19 +985,28 @@ def test_pow(lop):
985
985
986
986
assert three ** two == pow (3 , 2 )
987
987
assert 3 ** two == pow (3 , 2 )
988
+ assert pow (3 , two ) == pow (3 , 2 )
988
989
assert three ** 2 == pow (3 , 2 )
989
990
990
991
assert pow (three , two ) == pow (3 , 2 )
991
992
assert pow (3 , two ) == pow (3 , 2 )
992
993
assert pow (three , 2 ) == pow (3 , 2 )
994
+ assert pow (three , 2 , 2 ) == pow (3 , 2 , 2 )
993
995
994
- # Only PyPy implements __rpow__ for ternary pow().
995
996
996
- if PYPY :
997
- assert pow (three , two , 2 ) == pow (3 , 2 , 2 )
998
- assert pow (3 , two , 2 ) == pow (3 , 2 , 2 )
997
+ @pytest .mark .xfail
998
+ def test_pow_ternary (lop ):
999
+ two = lop .Proxy (lambda : 2 )
1000
+ three = lop .Proxy (lambda : 3 )
999
1001
1000
- assert pow (three , 2 , 2 ) == pow (3 , 2 , 2 )
1002
+ assert pow (three , two , 2 ) == pow (3 , 2 , 2 )
1003
+
1004
+
1005
+ @pytest .mark .xfail
1006
+ def test_rpow_ternary (lop ):
1007
+ two = lop .Proxy (lambda : 2 )
1008
+
1009
+ assert pow (3 , two , 2 ) == pow (3 , 2 , 2 )
1001
1010
1002
1011
1003
1012
def test_lshift (lop ):
0 commit comments