Skip to content

Commit

Permalink
Add unit test for bug #528
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Dec 1, 2023
1 parent 21a344d commit 50c394c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_primes.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ def test_next_prime(next_prime):
assert galois.next_prime(x) == z


def test_next_prime_bug_528():
"""
https://github.com/mhostetter/galois/issues/528
"""
assert galois.next_prime(100000034) == 100000037
assert galois.next_prime(100000035) == 100000037
assert galois.next_prime(100000036) == 100000037
assert galois.next_prime(100000037) == 100000039
assert galois.next_prime(100000038) == 100000039


def test_random_prime_exceptions():
with pytest.raises(TypeError):
galois.random_prime(10.0)
Expand Down

0 comments on commit 50c394c

Please sign in to comment.