8000 Merge pull request #7668 from QuLogic/fix-svg-test-windows · matplotlib/matplotlib@8b80068 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8b80068

Browse files
authored
Merge pull request #7668 from QuLogic/fix-svg-test-windows
TST: Save SVG test directly to file instead of its name.
2 parents 7131876 + 2679ddd commit 8b80068

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ def test_missing_psfont(mock):
217217
rc('text', usetex=True)
218218
fig, ax = plt.subplots()
219219
ax.text(0.5, 0.5, 'hello')
220-
with tempfile.NamedTemporaryFile(suffix='.svg') as tmpfile:
221-
fig.savefig(tmpfile.name)
220+
with tempfile.TemporaryFile() as tmpfile:
221+
fig.savefig(tmpfile, format='svg')
222222

223223

224224
if __name__ == '__main__':

0 commit comments

Comments
 (0)
0