From ecec5e7a8c1d2a11d7850f6d3cc2a13ecb0cb197 Mon Sep 17 00:00:00 2001 From: Markus Quade Date: Thu, 30 Aug 2018 16:57:40 +0200 Subject: [PATCH] fix rng in test --- tests/test_cgp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_cgp.py b/tests/test_cgp.py index dbaa4a9..24cba34 100644 --- a/tests/test_cgp.py +++ b/tests/test_cgp.py @@ -111,9 +111,7 @@ def assert_different_individuals(old, new): @hypothesis.settings(max_examples=25) @hypothesis.given(ind_strat, s.data()) def test_mutation(ind, data): - new_ind = mutate( - ind, n_mutations=data.draw(integers(5, 10)), method=data.draw(s.sampled_from(["active", "point"])) - ) + new_ind = mutate(ind, n_mutations=5, method=data.draw(s.sampled_from(["active", "point"])), random_state=0) assert_different_individuals(ind, new_ind)