Skip to content

Commit

Permalink
Truncate 'match' in test for exception to avoid brackets
Browse files Browse the repository at this point in the history
The way to properly escape brackets seems not to be compatible between
Python-3.7 and Python-3.9, so do not check for the part of the error
message with brackets in.
  • Loading branch information
johnomotani committed Jul 13, 2021
1 parent 178f8af commit 3a34a8c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions boutdata/tests/test_collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,8 @@ def test_core_min_files_existing_squash_file_raises(self, tmp_path, time_split):

with pytest.raises(
ValueError,
match=r"already exists, squashoutput\(\) will not overwrite. Also, "
r"for some filenames collect may try to read from this file, which is "
r"presumably not desired behaviour.",
match=r" will not overwrite. Also, for some filenames collect may try "
r"to read from this file, which is presumably not desired behaviour.",
):
squashoutput(tmp_path, outputname="boutdata.nc", **squash_kwargs)

Expand Down

0 comments on commit 3a34a8c

Please sign in to comment.