From 92ed81bcdc7f5243f08a72fd5ea10c0d5a0c5b90 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 1 Sep 2022 22:10:34 -0700 Subject: [PATCH] Fix imageseries test warnings, update back compat (#1553) --- src/pynwb/image.py | 2 +- .../back_compat/1.5.1_imageseries_no_data.nwb | Bin 169624 -> 169624 bytes .../back_compat/1.5.1_imageseries_no_unit.nwb | Bin 169408 -> 169408 bytes tests/unit/test_image.py | 4 +++- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pynwb/image.py b/src/pynwb/image.py index d8953d397..c399289ed 100644 --- a/src/pynwb/image.py +++ b/src/pynwb/image.py @@ -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, ) diff --git a/tests/back_compat/1.5.1_imageseries_no_data.nwb b/tests/back_compat/1.5.1_imageseries_no_data.nwb index 298ce5b9c0df4ac138bfa723245190ef78305497..0356144634d12080246c105b5f34f76006f35798 100644 GIT binary patch delta 552 zcmbQSmTSgZt_^#**{_%hCi5_OOg_wQIyu5dfSHkjVe&yv^@$hwHaqY*Fhv?zm>QU; zq?+g^8Ce?ZniwZr>Lw)`r0FIanwXedBpVth85lDF0Vjw60tGP1z+hxxWTb0gscT>u zVq|1xVqs-!q-SJiU}0jSZD3$!V8Au`BcJ%>4}8Y<$kJxUh7f69s4)bL1FD~##2>G0 zYG!O^Xql*MW@(;oKd6irj zh`rfdzE>6;1`G@p6A#u--mo!x@?u*>sJhpaH`ysc*}EruIU7tqWDnu%Z<@Ke!9j)@ zY{-1)y*yw>d_X7@So!)1GdBkWn@B?SzMfo^3o~c(X01FYcChmNQY7UG6(s^t<&!sO zbwZV_pI|EsR{MS}FC&=oe;t&;zX8gS-w0*sZz_EbHRAR3NwXMXR=%FTXf~7+A25A; g+#JSzV6(Q%&trsW-L5|$#+CLiWDoqR%0K$MXI0+^sQGl-tNS6+Fu1CIk!q@|gO zrMZEjg>F)^S)#6qk+~U=Woo2rmTGL8nrxJ4Xkcyz(!mKLfItCEGB6k!7#ZmrSn3)W zh8P%InHXCc8|ayu8JU<_Xd4(<85nR){>Udj`2(M^J+icsu{lJV7itUv-?nz^~bL53M@ z$b9F$JYYtAKqwPf`T7YnHwOfpNJ90#o?Mg*GiUN{| diff --git a/tests/back_compat/1.5.1_imageseries_no_unit.nwb b/tests/back_compat/1.5.1_imageseries_no_unit.nwb index c238e5fdf639d710e69330f5b684b3b81370b8a9..10c6e9f4a0fb454da5371c29c59df1fecbc156ba 100644 GIT binary patch delta 452 zcmX@Gn(M%7t_^p%nXi}$Zobbwl?%)$7dyzVVrpVykYa9Ztea|Xk*aHwmTah-WNMtM zYiXEjU}}+KWM*J&HaSL4p5MsG%EZFT)JV_V!pzLVWOA2Wpct~4iMffkfq|8Q0r%uY zIVlw7K&i=6@^Q*ZW+};uW`^dv7RF{tx+do4M!J>;X~w#SMn)E9=E)X`76zMV%LmGU zTsQf>^RBbRqze0H6c_ delta 452 zcmX@Gn(M%7t_^p%nUl2yHs9x-$^~YWiydTFF*GnWw=_vI&`mN(OwlzlOiI(WFi14g zO*Tw5H83|$N;WYto*W}5&u?ICWnye)Y^Y~wW?*V;KDkRSPz+hj$kJTfz`)ADfO~SH zoD_<3pwwh3`8eg2v{d61OJhr2gVe-iU6Vu$V_nOXv_xHFOCv**l;ji>BlFF(cn=##KK9mDAWa5Q@ O?EwoI?|gwOod^I0wUfgD diff --git a/tests/unit/test_image.py b/tests/unit/test_image.py index 7ac426be8..c279101f5 100644 --- a/tests/unit/test_image.py +++ b/tests/unit/test_image.py @@ -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]) @@ -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) @@ -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(