Skip to content

Commit

Permalink
Fix for Pytest 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Mar 29, 2024
1 parent 2b91423 commit 970402f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hickle/tests/test_hickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import re
from pprint import pprint
import pickle
import warnings


# Package imports
Expand Down Expand Up @@ -793,9 +794,9 @@ def test_slash_dict_keys(test_file_name,compression_kwargs):

# Check that having backslashes in dict keys will serialize the dict
dct2 = {'a\\b': [1, '2'], 1.4: 3}
with pytest.warns(None) as not_expected:
with warnings.catch_warnings():
warnings.simplefilter("error")
dump(dct2, test_file_name,**compression_kwargs)
assert not not_expected


# %% MAIN SCRIPT
Expand Down

0 comments on commit 970402f

Please sign in to comment.