diff options
author | d-kiss <speakupness@gmail.com> | 2018-01-27 23:51:01 +0200 |
---|---|---|
committer | d-kiss <speakupness@gmail.com> | 2018-01-27 23:51:01 +0200 |
commit | 6158b1782e318eccde0d1e6956bc6b53f5de3d5f (patch) | |
tree | 311d01615d4ff9aaf9e746cc39beab7070a62e7e | |
parent | a0f5b56c6a3c05cb2dc9cadbd876dcce63ea67ee (diff) | |
download | natsort-6158b1782e318eccde0d1e6956bc6b53f5de3d5f.tar.gz |
Made the build non-flaky.
-rw-r--r-- | test_natsort/test_main.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test_natsort/test_main.py b/test_natsort/test_main.py index 704e0bb..148d873 100644 --- a/test_natsort/test_main.py +++ b/test_natsort/test_main.py @@ -210,9 +210,11 @@ def test_check_filter_converts_filter_numbers_to_floats_if_filter_is_valid_examp assert check_filter([(6, 7), (2, 8)]) == [(6.0, 7.0), (2.0, 8.0)] -@given(x=tuples(integers(), integers(), floats(), floats()), y=tuples(integers(), floats(), floats(), integers())) -def test_check_filter_converts_filter_numbers_to_floats_if_filter_is_valid(x, y): - assume(all(float(i) < float(j) for i, j in zip(x, y))) +@given(x=tuples(integers(max_value=100000, min_value=-100000), integers(max_value=100000, min_value=-100000), + floats(max_value=100000, min_value=-100000), floats(max_value=100000, min_value=-100000))) +def test_check_filter_converts_filter_numbers_to_floats_if_filter_is_valid(x): + y = [a + 1 for a in x] + assert all(float(i) < float(j) for i, j in zip(x, y)) assert check_filter(list(zip(x, y))) == [(float(i), float(j)) for i, j in zip(x, y)] |