From f8347f1304f993443ef63976b5b929d8c6ddad4e Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Wed, 22 Nov 2023 09:38:05 -0700 Subject: [PATCH] Use the test ID as the unique component of the test run collection This is a reasonable thing to do in general, but is important when using pytest-randomly because when using that plugin without the --randomly-dont-reset-seed flag, the seed is forced to the global value before every test is run. This leads to makeTestCollection returning the same random integer for every test and the runs clash in the shared repo. --- tests/test_testUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_testUtils.py b/tests/test_testUtils.py index af1df373b..c06e35cc0 100644 --- a/tests/test_testUtils.py +++ b/tests/test_testUtils.py @@ -247,7 +247,7 @@ def tearDownClass(cls): def setUp(self): super().setUp() - self.butler = butlerTests.makeTestCollection(self.repo) + self.butler = butlerTests.makeTestCollection(self.repo, uniqueId=self.id()) def _makeVisitTestData(self, dataId): """Create dummy datasets suitable for VisitTask.