Shuffle arguments before running hooks

This commit is contained in:
Chris Kuehl 2018-11-19 17:36:57 -08:00
parent 6b6ebe7e30
commit 45e3dab00d
2 changed files with 26 additions and 0 deletions

View file

@ -62,3 +62,7 @@ def test_target_concurrency_cpu_count_not_implemented():
):
with mock.patch.dict(os.environ, {}, clear=True):
assert helpers.target_concurrency({'require_serial': False}) == 1
def test_shuffled_is_deterministic():
assert helpers._shuffled(range(10)) == [3, 7, 8, 2, 4, 6, 5, 1, 0, 9]