Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/pyrecest/filters/sequence_node_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ class SequenceAssociationNode(_SequenceAssociationNode):
"""Sequence-association node with consistent gap-node bookkeeping."""

def __post_init__(self) -> None:
if self.is_missed_detection and self.candidate_index is not None:
raise ValueError("candidate_index must be None for explicit gap nodes")
super().__post_init__()
11 changes: 11 additions & 0 deletions tests/filters/test_public_sequence_node_flag_validation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest
from pyrecest.filters import SequenceAssociationNode


def test_public_node_rejects_non_boolean_gap_flag_before_consistency_check():
with pytest.raises(ValueError, match="is_missed_detection must be a bool"):
SequenceAssociationNode(
frame_index=0,
candidate_index=1,
is_missed_detection="False",
)
Loading