-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TEST: Convert FreeSurfer tests to pytest #881
Conversation
Codecov Report
@@ Coverage Diff @@
## pytest #881 +/- ##
=======================================
Coverage 91.51% 91.51%
=======================================
Files 97 97
Lines 12403 12403
Branches 2185 2185
=======================================
Hits 11351 11351
Misses 708 708
Partials 344 344 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! The line 66 error is easily fixed (I think).
I made some style suggestions.
Also, I think you'll need to add test_io
to the ignore list in Azure:
nibabel/.azure-pipelines/windows.yml
Lines 44 to 102 in 979b439
-I test_array_sequence ^ | |
-I test_tractogram ^ | |
-I test_api_validators ^ | |
-I test_arrayproxy ^ | |
-I test_arraywriters ^ | |
-I test_batteryrunners ^ | |
-I test_brikhead ^ | |
-I test_casting ^ | |
-I test_cifti2io_header ^ | |
-I test_data ^ | |
-I test_deprecated ^ | |
-I test_deprecator ^ | |
-I test_dft ^ | |
-I test_ecat ^ | |
-I test_ecat_data ^ | |
-I test_endiancodes ^ | |
-I test_environment ^ | |
-I test_euler ^ | |
-I test_filebasedimages ^ | |
-I test_filehandles ^ | |
-I test_fileholders ^ | |
-I test_filename_parser ^ | |
-I test_files_interface ^ | |
-I test_fileslice ^ | |
-I test_fileutils ^ | |
-I test_floating ^ | |
-I test_funcs ^ | |
-I test_giftiio ^ | |
-I test_h5py_compat ^ | |
-I test_image_api ^ | |
-I test_image_load_save ^ | |
-I test_image_types ^ | |
-I test_imageclasses ^ | |
-I test_imageglobals ^ | |
-I test_keywordonly ^ | |
-I test_loadsave ^ | |
-I test_minc1 ^ | |
-I test_minc2 ^ | |
-I test_minc2_data ^ | |
-I test_mriutils ^ | |
-I test_netcdf ^ | |
-I test_nibabel_data ^ | |
-I test_nifti1 ^ | |
-I test_nifti2 ^ | |
-I test_openers ^ | |
-I test_optpkg ^ | |
-I test_orientations ^ | |
-I test_parrec ^ | |
-I test_parrec_data ^ | |
-I test_pkg_info ^ | |
-I test_processing ^ | |
-I test_proxy_api ^ | |
-I test_quaternions ^ | |
-I test_recoder ^ | |
-I test_remmovalschedule ^ | |
-I test_round_trip ^ | |
-I test_rstutils ^ | |
-I test_scaling ^ | |
-I test_wrapstruct |
and Travis:
Lines 131 to 189 in 979b439
-I test_array_sequence \ | |
-I test_tractogram \ | |
-I test_api_validators \ | |
-I test_arrayproxy \ | |
-I test_arraywriters \ | |
-I test_batteryrunners \ | |
-I test_brikhead \ | |
-I test_casting \ | |
-I test_cifti2io_header \ | |
-I test_data \ | |
-I test_deprecated \ | |
-I test_deprecator \ | |
-I test_dft \ | |
-I test_ecat \ | |
-I test_ecat_data \ | |
-I test_endiancodes \ | |
-I test_environment \ | |
-I test_euler \ | |
-I test_filebasedimages \ | |
-I test_filehandles \ | |
-I test_fileholders \ | |
-I test_filename_parser \ | |
-I test_files_interface \ | |
-I test_fileslice \ | |
-I test_fileutils \ | |
-I test_floating \ | |
-I test_funcs \ | |
-I test_giftiio \ | |
-I test_h5py_compat \ | |
-I test_image_api \ | |
-I test_image_load_save \ | |
-I test_image_types \ | |
-I test_imageclasses \ | |
-I test_imageglobals \ | |
-I test_keywordonly \ | |
-I test_loadsave \ | |
-I test_minc1 \ | |
-I test_minc2 \ | |
-I test_minc2_data \ | |
-I test_mriutils \ | |
-I test_netcdf \ | |
-I test_nibabel_data \ | |
-I test_nifti1 \ | |
-I test_nifti2 \ | |
-I test_openers \ | |
-I test_optpkg \ | |
-I test_orientations \ | |
-I test_parrec \ | |
-I test_parrec_data \ | |
-I test_pkg_info \ | |
-I test_processing \ | |
-I test_proxy_api \ | |
-I test_quaternions \ | |
-I test_recoder \ | |
-I test_remmovalschedule \ | |
-I test_round_trip \ | |
-I test_rstutils \ | |
-I test_scaling \ | |
-I test_wrapstruct |
nibabel/freesurfer/tests/test_io.py
Outdated
@@ -272,7 +272,7 @@ def test_write_annot_fill_ctab(): | |||
print(labels) | |||
with clear_and_catch_warnings() as w: | |||
write_annot(annot_path, labels, rgbal, names, fill_ctab=False) | |||
assert_true( | |||
assert ( | |||
any('Annotation values in {} will be incorrect'.format( | |||
annot_path) == str(ww.message) for ww in w)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can become:
assert any('Annotation values in {} will be incorrect'.format(annot_path) == str(ww.message)
for ww in w)
Similarly below.
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
…babel into test/pytest_freesurfer Changes
TEST: Some cleanups for nipy#881
Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like only one test failure:
Co-Authored-By: Chris Markiewicz <effigies@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Let's see what the CI says...
Nice work! Thanks. |
please note that line 66 creates an error (as the assertion is false). I don't know if we should just omit it or should I change something.