-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX for sct_register_multimodal to fix failing test
The default values for "-param" are currently defined in the root of the module. This allows the variable to be accessed in main() AND in get_parser() (so that the defaults could be printed in the argpase help). However, because it was module-scoped, the variable would get reused between different test runs, and the values from the previous test run would be retained. To fix this, we use deepcopy to make sure we have a fresh set of defaults each time. As an alternate solution, we could store the default values for "-param" in the argparse "default=" field. I think this would be more ideal than having a module-scoped variable. But, because "-param" is so complex to parse, I could not find an easy/simple way to do this.
- Loading branch information
1 parent
717bad3
commit b78ce08
Showing
1 changed file
with
18 additions
and
16 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