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 4886ea9

Browse filesBrowse files
committed
In unit/memleak, write to in-memory buffer instead of file.
(Avoids cluttering the source directory.)
1 parent 6336f2d commit 4886ea9
Copy full SHA for 4886ea9

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-1
lines changed

‎unit/memleak.py

Copy file name to clipboardExpand all lines: unit/memleak.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import print_function
44

55
import gc
6+
from io import BytesIO
67

78
try:
89
import tracemalloc
@@ -110,7 +111,7 @@ def __call__(self):
110111
ax = fig.add_subplot(224)
111112
ax.pcolor(10 * np.random.rand(50, 50))
112113

113-
fig.savefig('tmp', dpi=75)
114+
fig.savefig(BytesIO(), dpi=75)
114115
plt.close(1)
115116

116117

0 commit comments

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