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 0134e6d

Browse filesBrowse files
authored
Merge pull request #25792 from scottshambaugh/wsl_expected_images
Fix broken symlinks for expected images on WSL
2 parents 212caa0 + aa0cda7 commit 0134e6d
Copy full SHA for 0134e6d

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎lib/matplotlib/testing/decorators.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/decorators.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import functools
33
import inspect
44
import os
5+
from platform import uname
56
from pathlib import Path
67
import shutil
78
import string
@@ -135,6 +136,8 @@ def copy_baseline(self, baseline, extension):
135136
with contextlib.suppress(OSError):
136137
os.remove(expected_fname)
137138
try:
139+
if 'microsoft' in uname().release.lower():
140+
raise OSError # On WSL, symlink breaks silently
138141
os.symlink(orig_expected_path, expected_fname)
139142
except OSError: # On Windows, symlink *may* be unavailable.
140143
shutil.copyfile(orig_expected_path, expected_fname)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.