Skip to content

Commit

Permalink
Actual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SrGonao committed Feb 3, 2024
1 parent 244f521 commit 84c9c8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_permutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ def test_permute():
for i in range(100000):
assert perm.random_number_generator() >= 0
assert perm.random_number_generator() <= 1

state = perm.state
assert state == 822144001
# Test the permutation
test_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
length = len(test_list)
for i in range(100000):
perm.permute(test_list)
assert len(test_list) == length
assert test_list == [5, 6, 4, 10, 7, 2, 1, 3, 8, 9]

0 comments on commit 84c9c8f

Please sign in to comment.