Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ceed678

Browse files
Check for WSL2 and WSL1
1 parent ca4bfce commit ceed678

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ def copy_baseline(self, baseline, extension):
135135
# os.symlink errors if the target already exists.
136136
with contextlib.suppress(OSError):
137137
os.remove(expected_fname)
138-
if 'microsoft-standard' in uname().release:
138+
if ('microsoft-standard' in uname().release # WSL2
139+
or 'Microsoft' in uname().release): # WSL1
139140
# On WSL, symlink breaks silently
140141
shutil.copyfile(orig_expected_path, expected_fname)
141142
else:

0 commit comments

Comments
 (0)