Skip to content

Commit

Permalink
Test the main entrypoint (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn authored Sep 13, 2024
1 parent 30d9cb1 commit 3ca1b0f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
from cfmtoolbox.toolbox import CFMToolbox


def test_entrypoint_runs_cli(capsys):
with pytest.raises(SystemExit):
from cfmtoolbox.__main__ import app

assert app

stdout, stderr = capsys.readouterr()
assert stdout == ""
assert "Missing command." in stderr


def test_import_model_without_import_path():
app = CFMToolbox()
assert app.import_path is None
Expand Down

0 comments on commit 3ca1b0f

Please sign in to comment.