Skip to content

Commit

Permalink
ENH: Test scripts can be called with the help flag
Browse files Browse the repository at this point in the history
Test scripts can be called with the help flag.
  • Loading branch information
jhlegarreta committed Jan 14, 2025
1 parent ffa64fe commit 7ae1082
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ resmon = ["psutil >=5.4"]
test = [
"coverage",
"pytest >= 4.4",
"pytest-console-scripts",
"pytest-cov",
"pytest-env",
"pytest-xdist >= 1.28"
Expand Down
27 changes: 27 additions & 0 deletions test/test_dwi_gp_estimation_error_analysis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright The NiPreps Developers <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# We support and encourage derived works from this project, please read
# about our expectations at
#
# https://www.nipreps.org/community/licensing/
#


def test_help_option(script_runner):
ret = script_runner.run("dwi_gp_estimation_error_analysis.py", "--help")
assert ret.success
27 changes: 27 additions & 0 deletions test/test_dwi_gp_estimation_error_analysis_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright The NiPreps Developers <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# We support and encourage derived works from this project, please read
# about our expectations at
#
# https://www.nipreps.org/community/licensing/
#


def test_help_option(script_runner):
ret = script_runner.run("dwi_gp_estimation_error_analysis_plot.py", "--help")
assert ret.success
27 changes: 27 additions & 0 deletions test/test_dwi_gp_estimation_signal_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright The NiPreps Developers <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# We support and encourage derived works from this project, please read
# about our expectations at
#
# https://www.nipreps.org/community/licensing/
#


def test_help_option(script_runner):
ret = script_runner.run("dwi_gp_estimation_signal_plot.py", "--help")
assert ret.success
27 changes: 27 additions & 0 deletions test/test_dwi_gp_estimation_simulated_signal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright The NiPreps Developers <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# We support and encourage derived works from this project, please read
# about our expectations at
#
# https://www.nipreps.org/community/licensing/
#


def test_help_option(script_runner):
ret = script_runner.run("dwi_gp_estimation_simulated_signal.py", "--help")
assert ret.success
27 changes: 27 additions & 0 deletions test/test_optimize_registration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright The NiPreps Developers <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# We support and encourage derived works from this project, please read
# about our expectations at
#
# https://www.nipreps.org/community/licensing/
#


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

0 comments on commit 7ae1082

Please sign in to comment.