Skip to content

Commit 2066497

Browse files
authored
Merge pull request #9919 from anntzer/memleak
In unit/memleak, write to in-memory buffer instead of file.
2 parents aa0f868 + 4886ea9 commit 2066497

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unit/memleak.py

+2-1
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)