We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4aab407 commit 2ca62afCopy full SHA for 2ca62af
tests/test_lazy_object_proxy.py
@@ -985,19 +985,28 @@ def test_pow(lop):
985
986
assert three**two == pow(3, 2)
987
assert 3**two == pow(3, 2)
988
+ assert pow(3, two) == pow(3, 2)
989
assert three**2 == pow(3, 2)
990
991
assert pow(three, two) == pow(3, 2)
992
assert pow(3, two) == pow(3, 2)
993
assert pow(three, 2) == pow(3, 2)
994
+ assert pow(three, 2, 2) == pow(3, 2, 2)
995
- # Only PyPy implements __rpow__ for ternary pow().
996
- if PYPY:
997
- assert pow(three, two, 2) == pow(3, 2, 2)
998
- assert pow(3, two, 2) == pow(3, 2, 2)
+@pytest.mark.xfail
+def test_pow_ternary(lop):
999
+ two = lop.Proxy(lambda: 2)
1000
+ three = lop.Proxy(lambda: 3)
1001
- assert pow(three, 2, 2) == pow(3, 2, 2)
1002
+ assert pow(three, two, 2) == pow(3, 2, 2)
1003
+
1004
1005
1006
+def test_rpow_ternary(lop):
1007
1008
1009
+ assert pow(3, two, 2) == pow(3, 2, 2)
1010
1011
1012
def test_lshift(lop):
0 commit comments