Skip to content

Commit

Permalink
Fix existing test to filter deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung committed Jan 27, 2025
1 parent 712e19a commit eae9464
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/exporter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ def test_mcstas_reduction_export_to_bytestream(reduced_data: NMXReducedData) ->
]

with io.BytesIO() as bio:
export_as_nexus(reduced_data, bio)
with pytest.warns(
DeprecationWarning, match='Please use ``export_as_nxlauetof`` instead.'
):
export_as_nexus(reduced_data, bio)
with h5py.File(bio, 'r') as f:
assert 'NMX_data' in f
nmx_data: h5py.Group = f.require_group('NMX_data')
Expand Down

0 comments on commit eae9464

Please sign in to comment.