Skip to content

Commit 02a153a

Browse files
committed
Disable hash comparison on Windows and macOS
1 parent d2c962d commit 02a153a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tests/test_plot.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@
2424
baseline_dir = str(PathPlus(__file__).parent / "baseline")
2525
assert os.path.exists(baseline_dir)
2626

27-
if sys.version_info[:2] == (3, 7):
28-
image_hashes = str(PathPlus(__file__).parent / "image_hashes_37.json")
29-
elif sys.version_info[:2] == (3, 8):
30-
image_hashes = str(PathPlus(__file__).parent / "image_hashes_38.json")
31-
elif sys.version_info[:2] == (3, 9):
32-
image_hashes = str(PathPlus(__file__).parent / "image_hashes_39.json")
33-
else:
34-
image_hashes = str(PathPlus(__file__).parent / "image_hashes.json")
27+
if platform.system == "Linux":
28+
if sys.version_info[:2] == (3, 7):
29+
image_hashes = str(PathPlus(__file__).parent / "image_hashes_37.json")
30+
elif sys.version_info[:2] == (3, 8):
31+
image_hashes = str(PathPlus(__file__).parent / "image_hashes_38.json")
32+
elif sys.version_info[:2] == (3, 9):
33+
image_hashes = str(PathPlus(__file__).parent / "image_hashes_39.json")
34+
else:
35+
image_hashes = str(PathPlus(__file__).parent / "image_hashes.json")
3536

3637
check_images = pytest.mark.mpl_image_compare(
3738
baseline_dir=baseline_dir,

0 commit comments

Comments
 (0)