Skip to content

Commit 7bc856c

Browse files
FFroehlichclaude
andcommitted
test_assignments_to_experiments_unused_condition_id: expect the start period
Since the experiment keeps the period that starts it, the switch's condition is at the second period, after an empty one at t = 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b087dfc commit 7bc856c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/v2/test_conversion.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,10 @@ def test_assignments_to_experiments_unused_condition_id():
729729
converted = assignments_to_experiments(problem)
730730

731731
assert [c.id for c in converted.conditions] == ["cond_0_1"]
732-
assert converted.experiments[0].periods[0].condition_ids == ["cond_0_1"]
732+
# the experiment starts at 0, where nothing changes
733+
assert [
734+
(p.time, p.condition_ids) for p in converted.experiments[0].periods
735+
] == [(0.0, []), (10.0, ["cond_0_1"])]
733736

734737

735738
def test_assignments_to_experiments_nested():

0 commit comments

Comments
 (0)