Skip to content

Commit

Permalink
Backport PR matplotlib#27377: TST: Make test_movie_writer_invalid_pat…
Browse files Browse the repository at this point in the history
…h locale-agnostic
  • Loading branch information
story645 authored and meeseeksmachine committed Nov 28, 2023
1 parent 25d096f commit c302598
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/tests/test_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,9 @@ def test_disable_cache_warning(anim):

def test_movie_writer_invalid_path(anim):
if sys.platform == "win32":
match_str = re.escape("[WinError 3] The system cannot find the path specified:")
match_str = r"\[WinError 3] .*'\\\\foo\\\\bar\\\\aardvark'"
else:
match_str = re.escape("[Errno 2] No such file or directory: '/foo")
match_str = r"\[Errno 2] .*'/foo"
with pytest.raises(FileNotFoundError, match=match_str):
anim.save("/foo/bar/aardvark/thiscannotreallyexist.mp4",
writer=animation.FFMpegFileWriter())

0 comments on commit c302598

Please sign in to comment.