8000 Change the result_dir to be test-specific · matplotlib/matplotlib@eb01668 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb01668

Browse files
committed
Change the result_dir to be test-specific
1 parent 9cb6462 commit eb01668

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_compare_images.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
# Now test the reverse comparison.
4343
('all128.png', 'all127.png', 0, 1),
4444
])
45< 833D /code>-
def test_image_comparison_expect_rms(im1, im2, tol, expect_rms):
45+
def test_image_comparison_expect_rms(im1, im2, tol, expect_rms, tmp_path,
46+
monkeypatch):
4647
"""
4748
Compare two images, expecting a particular RMS error.
4849
@@ -54,6 +55,7 @@ def test_image_comparison_expect_rms(im1, im2, tol, expect_rms):
5455
succeed if compare_images succeeds. Otherwise, the test will succeed if
5556
compare_images fails and returns an RMS error almost equal to this value.
5657
"""
58+
monkeypatch.chdir(tmp_path)
5759
baseline_dir, result_dir = map(Path, _image_directories(lambda: "dummy"))
5860
# Copy both "baseline" and "test" image to result_dir, so that 1)
5961
# compare_images writes the diff to result_dir, rather than to the source

0 commit comments

Comments
 (0)
0