Skip to content

Commit 9ec566e

Browse files
waltsimsclaude
andcommitted
Skip CLI tests when click is not installed
Uses pytest.importorskip so test collection succeeds in CI environments that don't install the cli extra. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d26ab30 commit 9ec566e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_cli/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
import json
44

55
import pytest
6-
from click.testing import CliRunner
76

8-
from kwave.cli.main import cli
7+
click = pytest.importorskip("click", reason="CLI tests require click: pip install k-wave-python[cli]")
8+
from click.testing import CliRunner # noqa: E402
9+
10+
from kwave.cli.main import cli # noqa: E402
911

1012

1113
def invoke(runner, args, session_dir):

0 commit comments

Comments
 (0)