@@ -345,11 +345,14 @@ def test_deprecated_fields():
345345
346346 # mrparams is the only deprecated field at the moment
347347 # Accessing hdr_data is equivalent to accessing hdr, so double all checks
348- assert_array_equal (hdr ['mrparams' ], 0 )
348+ with pytest .deprecated_call (match = "from version: 2.3" ):
349+ assert_array_equal (hdr ['mrparams' ], 0 )
349350 assert_array_equal (hdr_data ['mrparams' ], 0 )
350351
351- hdr ['mrparams' ] = [1 , 2 , 3 , 4 ]
352- assert_array_almost_equal (hdr ['mrparams' ], [1 , 2 , 3 , 4 ])
352+ with pytest .deprecated_call (match = "from version: 2.3" ):
353+ hdr ['mrparams' ] = [1 , 2 , 3 , 4 ]
354+ with pytest .deprecated_call (match = "from version: 2.3" ):
355+ assert_array_almost_equal (hdr ['mrparams' ], [1 , 2 , 3 , 4 ])
353356 assert hdr ['tr' ] == 1
354357 assert hdr ['flip_angle' ] == 2
355358 assert hdr ['te' ] == 3
@@ -366,14 +369,16 @@ def test_deprecated_fields():
366369 hdr ['flip_angle' ] = 6
367370 hdr ['te' ] = 7
368371 hdr ['ti' ] = 8
369- assert_array_almost_equal (hdr ['mrparams' ], [5 , 6 , 7 , 8 ])
372+ with pytest .deprecated_call (match = "from version: 2.3" ):
373+ assert_array_almost_equal (hdr ['mrparams' ], [5 , 6 , 7 , 8 ])
370374 assert_array_almost_equal (hdr_data ['mrparams' ], [5 , 6 , 7 , 8 ])
371375
372376 hdr_data ['tr' ] = 9
373377 hdr_data ['flip_angle' ] = 10
374378 hdr_data ['te' ] = 11
375379 hdr_data ['ti' ] = 12
376- assert_array_almost_equal (hdr ['mrparams' ], [9 , 10 , 11 , 12 ])
380+ with pytest .deprecated_call (match = "from version: 2.3" ):
381+ assert_array_almost_equal (hdr ['mrparams' ], [9 , 10 , 11 , 12 ])
377382 assert_array_almost_equal (hdr_data ['mrparams' ], [9 , 10 , 11 , 12 ])
378383
379384
0 commit comments