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 f1c3444

Browse filesBrowse files
authored
Merge pull request #22768 from tacaswell/fix_inkscape
Fix inkscape tests
2 parents 574580c + 9e5fe13 commit f1c3444
Copy full SHA for f1c3444

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/testing/compare.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/compare.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ def __call__(self, orig, dest):
147147
weakref.finalize(self._tmpdir, self.__del__)
148148
if (not self._proc # First run.
149149
or self._proc.poll() is not None): # Inkscape terminated.
150+
if self._proc is not None and self._proc.poll() is not None:
151+
for stream in filter(None, [self._proc.stdin,
152+
self._proc.stdout,
153+
self._proc.stderr]):
154+
stream.close()
150155
env = {
151156
**os.environ,
152157
# If one passes e.g. a png file to Inkscape, it will try to
@@ -156,7 +161,7 @@ def __call__(self, orig, dest):
156161
# just be reported as a regular exception below).
157162
"DISPLAY": "",
158163
# Do not load any user options.
159-
"INKSCAPE_PROFILE_DIR": os.devnull,
164+
"INKSCAPE_PROFILE_DIR": self._tmpdir.name,
160165
}
161166
# Old versions of Inkscape (e.g. 0.48.3.1) seem to sometimes
162167
# deadlock when stderr is redirected to a pipe, so we redirect it

0 commit comments

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