Skip to content

Commit

Permalink
ENH: Test calling the scripts
Browse files Browse the repository at this point in the history
Test calling the scripts to print their usage.

Add the `pytest-console-script` dependency so that the scripts can be
called when executing `pytest`.
  • Loading branch information
jhlegarreta committed Jan 14, 2025
1 parent afb437b commit 34b8161
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ doc = [
test = [
"coverage",
"pytest",
"pytest-console-scripts",
]

[project.urls]
Expand Down
6 changes: 6 additions & 0 deletions tract_querier/tests/test_tract_math.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def test_help_option(script_runner):
ret = script_runner.run("tract_math", "--help")
assert ret.success
6 changes: 6 additions & 0 deletions tract_querier/tests/test_tract_querier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def test_help_option(script_runner):
ret = script_runner.run("tract_querier", "--help")
assert ret.success

0 comments on commit 34b8161

Please sign in to comment.