@@ -345,11 +345,14 @@ def test_deprecated_fields():
345
345
346
346
# mrparams is the only deprecated field at the moment
347
347
# Accessing hdr_data is equivalent to accessing hdr, so double all checks
348
- assert_array_equal (hdr ['mrparams' ], 0 )
348
+ with pytest .deprecated_call ():
349
+ assert_array_equal (hdr ['mrparams' ], 0 )
349
350
assert_array_equal (hdr_data ['mrparams' ], 0 )
350
351
351
- hdr ['mrparams' ] = [1 , 2 , 3 , 4 ]
352
- assert_array_almost_equal (hdr ['mrparams' ], [1 , 2 , 3 , 4 ])
352
+ with pytest .deprecated_call ():
353
+ hdr ['mrparams' ] = [1 , 2 , 3 , 4 ]
354
+ with pytest .deprecated_call ():
355
+ assert_array_almost_equal (hdr ['mrparams' ], [1 , 2 , 3 , 4 ])
353
356
assert hdr ['tr' ] == 1
354
357
assert hdr ['flip_angle' ] == 2
355
358
assert hdr ['te' ] == 3
@@ -366,14 +369,16 @@ def test_deprecated_fields():
366
369
hdr ['flip_angle' ] = 6
367
370
hdr ['te' ] = 7
368
371
hdr ['ti' ] = 8
369
- assert_array_almost_equal (hdr ['mrparams' ], [5 , 6 , 7 , 8 ])
372
+ with pytest .deprecated_call ():
373
+ assert_array_almost_equal (hdr ['mrparams' ], [5 , 6 , 7 , 8 ])
370
374
assert_array_almost_equal (hdr_data ['mrparams' ], [5 , 6 , 7 , 8 ])
371
375
372
376
hdr_data ['tr' ] = 9
373
377
hdr_data ['flip_angle' ] = 10
374
378
hdr_data ['te' ] = 11
375
379
hdr_data ['ti' ] = 12
376
- assert_array_almost_equal (hdr ['mrparams' ], [9 , 10 , 11 , 12 ])
380
+ with pytest .deprecated_call ():
381
+ assert_array_almost_equal (hdr ['mrparams' ], [9 , 10 , 11 , 12 ])
377
382
assert_array_almost_equal (hdr_data ['mrparams' ], [9 , 10 , 11 , 12 ])
378
383
379
384
0 commit comments