-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into normalizeBeforeMAPCA
- Loading branch information
Showing
8 changed files
with
115 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Test workflow parser utility functions.""" | ||
import argparse | ||
import pytest | ||
|
||
from tedana.workflows.parser_utils import check_tedpca_value | ||
|
||
|
||
def test_check_tedpca_value(): | ||
"""Test the check_tedpca_value function.""" | ||
with pytest.raises(argparse.ArgumentTypeError): | ||
check_tedpca_value("hello", is_parser=True) | ||
|
||
with pytest.raises(ValueError): | ||
check_tedpca_value("hello", is_parser=False) | ||
|
||
with pytest.raises(argparse.ArgumentTypeError): | ||
check_tedpca_value(1.5, is_parser=True) | ||
|
||
with pytest.raises(ValueError): | ||
check_tedpca_value(1.5, is_parser=False) | ||
|
||
assert check_tedpca_value(0.95) == 0.95 | ||
assert check_tedpca_value("mdl") == "mdl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters