From d6139b252529771acd3cba2b06be32d06f977482 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 4 Aug 2017 18:18:42 -0300 Subject: [PATCH] Make tests for loadscope deterministic Fix #199 --- testing/acceptance_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index ed2a494..1a51fae 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -729,9 +729,9 @@ class TestLoadScope: ) result = testdir.runpytest('-n2', '--dist=loadscope', '-v') assert get_workers_and_test_count_by_prefix( - 'test_a.py::test', result.outlines) == {'gw0': 10} + 'test_a.py::test', result.outlines) in ({'gw0': 10}, {'gw1': 10}) assert get_workers_and_test_count_by_prefix( - 'test_b.py::test', result.outlines) == {'gw1': 10} + 'test_b.py::test', result.outlines) in ({'gw0': 10}, {'gw1': 10}) def test_by_class(self, testdir): testdir.makepyfile(test_a=""" @@ -748,9 +748,9 @@ class TestLoadScope: """) result = testdir.runpytest('-n2', '--dist=loadscope', '-v') assert get_workers_and_test_count_by_prefix( - 'test_a.py::TestA', result.outlines) == {'gw0': 10} + 'test_a.py::TestA', result.outlines) in ({'gw0': 10}, {'gw1': 10}) assert get_workers_and_test_count_by_prefix( - 'test_a.py::TestB', result.outlines) == {'gw1': 10} + 'test_a.py::TestB', result.outlines) in ({'gw0': 10}, {'gw1': 10}) def parse_tests_and_workers_from_output(lines):