Skip to content

Commit

Permalink
add test case for random seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
1kastner committed Sep 26, 2023
1 parent d3489ac commit a05be93
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,21 @@ def test_reuse_existing_entry(self):
RandomSeedStore.create(
name="reuse_existing",
random_seed=seed,
is_random=True
is_random=False
)
random_seed = self.repository.get_random_seed("reuse_existing", False)
self.assertEqual(random_seed, seed)

def test_do_not_reuse_existing_random_entry(self):
seed = int(time.time())
RandomSeedStore.create(
name="reuse_existing",
random_seed=seed,
is_random=True
)
random_seed = self.repository.get_random_seed("reuse_existing", False)
self.assertNotEqual(random_seed, seed)

def test_fix_and_reuse_journey(self):
for _ in range(10):
seed = int(time.time())
Expand Down

0 comments on commit a05be93

Please sign in to comment.