Skip to content

Commit

Permalink
Fix imageseries test warnings, update back compat (#1553)
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Sep 2, 2022
1 parent 46627b5 commit 92ed81b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pynwb/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(self, **kwargs):
warnings.warn(
"%s '%s': The value for 'format' has been changed to 'external'. "
"Setting a default value for 'format' is deprecated and will be changed "
"to raising a ValueError in the next release."
"to raising a ValueError in the next major release."
% (self.__class__.__name__, self.name),
DeprecationWarning,
)
Expand Down
Binary file modified tests/back_compat/1.5.1_imageseries_no_data.nwb
Binary file not shown.
Binary file modified tests/back_compat/1.5.1_imageseries_no_unit.nwb
Binary file not shown.
4 changes: 3 additions & 1 deletion tests/unit/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def test_external_file_no_frame(self):
name='test_iS',
unit='unit',
external_file=['external_file'],
format="external",
timestamps=[1., 2., 3.]
)
self.assertListEqual(iS.starting_frame, [0])
Expand All @@ -78,6 +79,7 @@ def test_external_file_no_unit(self):
iS = ImageSeries(
name='test_iS',
external_file=['external_file'],
format="external",
timestamps=list()
)
self.assertEqual(iS.unit, ImageSeries.DEFAULT_UNIT)
Expand Down Expand Up @@ -242,7 +244,7 @@ def test_external_file_default_format(self):
msg = (
"ImageSeries 'test_iS': The value for 'format' has been changed to 'external'. "
"Setting a default value for 'format' is deprecated and will be changed to "
"raising a ValueError in the next release."
"raising a ValueError in the next major release."
)
with self.assertWarnsWith(DeprecationWarning, msg):
iS = ImageSeries(
Expand Down

0 comments on commit 92ed81b

Please sign in to comment.