8000 TST: Make test_movie_writer_invalid_path locale-agnostic · matplotlib/matplotlib@7ff0760 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7ff0760

Browse files
committed
TST: Make test_movie_writer_invalid_path locale-agnostic
Filtering on the error message failed on locales different from English (just matching the error in brackets would also do).
1 parent 62a5ba4 commit 7ff0760

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,9 +545,9 @@ def test_disable_cache_warning(anim):
545545

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

0 commit comments

Comments
 (0)
0