Skip to content

Commit 94f1f7f

Browse files
fix: Clear experiment data before testing keep_completed
The experiment table is already populated by the fixture, so populate() had nothing to do. Delete the data first to ensure there's work to be done. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9a165e9 commit 94f1f7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/integration/test_jobs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ def test_populate_reserve_jobs_with_keep_completed(clean_jobs, subject, experime
165165
166166
Regression test for https://github.com/datajoint/datajoint-python/issues/1379
167167
"""
168+
# Clear experiment data to ensure there's work to do
169+
experiment.delete()
170+
168171
with dj.config.override(jobs={"keep_completed": True, "add_job_metadata": True}):
169172
# Should not raise DataJointError about semantic matching
170173
experiment.populate(reserve_jobs=True)
@@ -182,6 +185,9 @@ def test_populate_reserve_jobs_keep_completed_repend(clean_jobs, subject, experi
182185
183186
Regression test for https://github.com/datajoint/datajoint-python/issues/1379
184187
"""
188+
# Clear experiment data to ensure there's work to do
189+
experiment.delete()
190+
185191
with dj.config.override(jobs={"keep_completed": True, "add_job_metadata": True}):
186192
# First populate
187193
experiment.populate(reserve_jobs=True)

0 commit comments

Comments
 (0)