diff --git a/.coveragerc b/.coveragerc index 41c432b..e60703c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -16,6 +16,8 @@ exclude_lines = def __repr__ if self\.debug + case never: + assert_never raise AssertionError raise NotImplementedError diff --git a/synth.yaml b/synth.yaml index 2b4ef6c..31583df 100644 --- a/synth.yaml +++ b/synth.yaml @@ -33,3 +33,4 @@ triggers: - tests/ - docs/examples/ - pyproject.toml + - .coveragerc diff --git a/synthesize/config.py b/synthesize/config.py index 0637989..5f129e6 100644 --- a/synthesize/config.py +++ b/synthesize/config.py @@ -194,8 +194,8 @@ def mermaid(self) -> str: seen_watches.add(h) lines.append(f'w_{h}[("{text}")]') lines.append(f"w_{h} -->|👁| {node.id}") - case _: - assert_never(node.trigger) + case never: + assert_never(never) return "\n ".join(lines).strip() diff --git a/tests/test_config.py b/tests/test_config.py index d199ddf..196c049 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -18,7 +18,8 @@ random_color, ) -EXAMPLES = list((Path(__file__).parent.parent / "docs" / "examples").iterdir()) +ROOT = Path(__file__).parent.parent +EXAMPLES = [*(ROOT / "docs" / "examples").iterdir(), ROOT / "synth.yaml"] @pytest.mark.parametrize("example", EXAMPLES)