Skip to content

Commit

Permalink
Use the test ID as the unique component of the test run collection
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
timj committed Nov 22, 2023
1 parent a1e3b54 commit f8347f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_testUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f8347f1

Please sign in to comment.