Skip to content

Commit 6cec36b

Browse files
authored
Merge pull request #240 from skirpichev/drop-graalpy-wa
Drop workarounds for GraalVM < v25.0.0
2 parents 4e9ae0c + 772cf53 commit 6cec36b

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

tests/test_mpz.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,6 @@ def test_mul_distributivity(x, y, z):
462462
assert mul(op(mx, my), mz) == op(mul(mx, mz), mul(my, mz))
463463

464464

465-
@pytest.mark.skipif(platform.python_implementation() == "GraalVM",
466-
reason="XXX: oracle/graalpython#534")
467465
@given(bigints(), bigints())
468466
@example(18446744073709551615, -1)
469467
@example(-2, 1<<64)
@@ -472,13 +470,16 @@ def test_mul_distributivity(x, y, z):
472470
@example(int("0x"+"f"*32, 0), -1<<64) # XXX: assuming BITS_PER_LIMB == 64
473471
@example(-68501870735943706700000000000000000001, 10**20) # issue 117
474472
@example(0, 123)
473+
@example(0, -1382074480823709287)
475474
def test_divmod_bulk(x, y):
476475
mx = mpz(x)
477476
my = mpz(y)
478477
if not y:
479478
with pytest.raises(ZeroDivisionError):
480479
mx // my
481480
return
481+
if y < 0 and platform.python_implementation() == "GraalVM":
482+
return # issue graalpython#534
482483
r = x // y
483484
assert mx // my == r
484485
assert mx // y == r
@@ -512,8 +513,6 @@ def test_divmod_errors():
512513
divmod(mx, 0)
513514

514515

515-
@pytest.mark.skipif(platform.python_implementation() == "GraalVM",
516-
reason="XXX: oracle/graalpython#474")
517516
@given(bigints(), bigints())
518517
@example(0, -1)
519518
@example(0, 123)
@@ -585,8 +584,6 @@ def test_truediv_errors():
585584
pytest.raises(TypeError, lambda: object() / mx)
586585

587586

588-
@pytest.mark.skipif(platform.python_implementation() == "GraalVM",
589-
reason="XXX: oracle/graalpython#473")
590587
@given(bigints(), integers(max_value=100000))
591588
@example(0, 123)
592589
@example(123, 0)
@@ -698,8 +695,6 @@ def test_power_errors():
698695
@example(1, 1<<128)
699696
@example(90605555449081991889354259339521952450308780844225461, 64)
700697
def test_lshift(x, y):
701-
if platform.python_implementation() == "GraalVM" and y < 0:
702-
return # XXX: oracle/graalpython#516
703698
mx = mpz(x)
704699
my = mpz(y)
705700
try:
@@ -805,8 +800,6 @@ def test_to_bytes_bulk(x, length, byteorder, signed):
805800
try:
806801
rx = x.to_bytes(length, byteorder, signed=signed)
807802
except OverflowError:
808-
if platform.python_implementation() == "GraalVM" and not length:
809-
return # XXX: oracle/graalpython#475
810803
with pytest.raises(OverflowError):
811804
mpz(x).to_bytes(length, byteorder, signed=signed)
812805
else:
@@ -870,10 +863,7 @@ def test_from_bytes_bulk(x, length, byteorder, signed):
870863
else:
871864
rx = int.from_bytes(bytes, byteorder, signed=signed)
872865
assert rx == mpz.from_bytes(bytes, byteorder, signed=signed)
873-
if platform.python_implementation() != "GraalVM":
874-
# XXX: oracle/graalpython#476
875-
assert rx == mpz.from_bytes(bytearray(bytes), byteorder,
876-
signed=signed)
866+
assert rx == mpz.from_bytes(bytearray(bytes), byteorder, signed=signed)
877867
assert rx == mpz.from_bytes(list(bytes), byteorder, signed=signed)
878868

879869

@@ -980,8 +970,6 @@ def test_digits_interface():
980970
assert x.digits(10) == x.digits(base=10) == x.digits()
981971

982972

983-
@pytest.mark.skipif(platform.python_implementation() == "GraalVM",
984-
reason="XXX: oracle/graalpython#479")
985973
@given(bigints(), integers(min_value=2, max_value=36))
986974
def test_digits_frombase(x, base):
987975
mx = mpz(x)

0 commit comments

Comments
 (0)