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

Skip to content

Commit 042cbb6

Browse files
committed
No context manager of seed -- bummer
1 parent 164124c commit 042cbb6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/tests/test_agg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ def test_long_path():
149149
buff = io.BytesIO()
150150

151151
fig, ax = plt.subplots()
152-
with np.random.seed(0):
153-
points = np.random.rand(70000)
154-
ax.plot(points)
155-
fig.savefig(buff, format='png')
152+
np.random.seed(0)
153+
points = np.random.rand(70000)
154+
ax.plot(points)
155+
fig.savefig(buff, format='png')
156156

157157

158158
if __name__ == "__main__":

0 commit comments

Comments
 (0)