diff --git a/bin/check-py b/bin/check-py index 5020a56..4b5a9b4 100755 --- a/bin/check-py +++ b/bin/check-py @@ -6,7 +6,14 @@ echo "Running ruff..." uv run --only-group dev ruff check . uv run --only-group dev ruff format --check . -echo "Running ty..." -uv run --only-group dev ty check +# ty check requires maturin develop (native module must be built). +# Skip in CI where the native module may not be available. +if [ -z "${CI:-}" ]; then + echo "Building Python bindings for type checking..." + uv run maturin develop + + echo "Running ty..." + uv run --only-group dev ty check +fi echo "Python checks passed!" diff --git a/tests/test_md_cli.py b/tests/test_md_cli.py new file mode 100644 index 0000000..8192344 --- /dev/null +++ b/tests/test_md_cli.py @@ -0,0 +1,17 @@ +"""Tests for the dkdc-md-cli Python bindings.""" + +from dkdc_md_cli import run, main + + +class TestImports: + def test_import_run(self): + assert callable(run) + + def test_import_main(self): + assert callable(main) + + def test_run_has_docstring(self): + assert run.__doc__ is not None + + def test_main_has_docstring(self): + assert main.__doc__ is not None