-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX add downloaded subjects to the cortex database (#413)
* FIX add downloaded subjects to the cortex database * ENH add reload_subjects method
- Loading branch information
Showing
3 changed files
with
23 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import cortex | ||
|
||
def test_download_subject(): | ||
# Test that newly downloaded subjects are added to the current database. | ||
|
||
# remove fsaverage from the list of available subjects if present. | ||
if "fsaverage" in cortex.db.subjects: | ||
cortex.db._subjects.pop("fsaverage") | ||
|
||
assert "fsaverage" not in cortex.db.subjects | ||
cortex.utils.download_subject(subject_id='fsaverage') | ||
assert "fsaverage" in cortex.db.subjects |
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