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 dffeac4 commit c89c0bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def tearDownClass(cls):

def setUp(self):
super().setUp()
self.butler = butlerTests.makeTestCollection(self.repo)
self.butler = butlerTests.makeTestCollection(self.repo, uniqueId=self.id())

self.dataId = {"instrument": "notACam", "visit": 101, "detector": 42}
# CalibrateTask absolutely requires an ExpandedDataCoordinate
Expand Down

0 comments on commit c89c0bb

Please sign in to comment.