Skip to content

Commit 3c01a4d

Browse files
Refine hidden pair test expectations
1 parent 22af0d5 commit 3c01a4d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/test_strategies_core.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,18 @@ def test_hidden_pair_prunes_extras() -> None:
132132
assert move["strategy"] == "hidden_pair"
133133
assert move["r"] in (1,)
134134
assert move["c"] in (0, 1)
135-
assert extra not in cand[1][0]
136-
assert extra not in cand[1][1]
135+
assert move["remove"] == extra
136+
first_target = (move["r"], move["c"])
137+
assert cand[first_target[0]][first_target[1]] == {digit_a, digit_b}
138+
139+
move_second = apply_hidden_pair(grid, cand)
140+
141+
assert move_second is not None
142+
assert move_second["strategy"] == "hidden_pair"
143+
assert (move_second["r"], move_second["c"]) != first_target
144+
assert move_second["remove"] == extra
145+
second_target = (move_second["r"], move_second["c"])
146+
assert cand[second_target[0]][second_target[1]] == {digit_a, digit_b}
137147

138148

139149
def test_naked_triple_clears_unit() -> None:

0 commit comments

Comments
 (0)