Skip to content

Commit e7995a6

Browse files
make test run serially to avoid caching issue and clear cache before each test as well as an additional safety measure
1 parent 3e16e1c commit e7995a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/unit/test_detect_platforms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ def build_response(status_code=200, headers=None):
1616
return response
1717

1818

19+
@pytest.mark.xdist_group(name="serial_tests")
1920
class TestDetectPlatforms:
2021
@pytest.fixture(autouse=True)
2122
def teardown(self):
2223
with patch.dict(os.environ, clear=True):
24+
detect_platforms.cache_clear() # clear cache before each test
2325
yield
2426
detect_platforms.cache_clear() # clear cache after each test
2527

0 commit comments

Comments
 (0)