8000 TST: tune test parameters · matplotlib/matplotlib@0f0ea22 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0f0ea22

Browse files
committed
TST: tune test parameters
- Make sure values are be big enough / small enough - make long path test more pathological (Random data will sometimes go in the same direction)
1 parent c4b1ddd commit 0f0ea22

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/tests/test_agg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def test_marker_with_nan():
7575

7676
def test_long_path():
7777
buff = io.BytesIO()
78-
79-
fig, ax = plt.subplots()
80-
np.random.seed(0)
81-
points = np.random.rand(70000)
78+
fig = Figure()
79+
ax = fig.subplots()
80+
points = np.ones(100_000)
81+
points[::2] *= -1
8282
ax.plot(points)
8383
fig.savefig(buff, format='png')
8484

lib/matplotlib/tests/test_simplification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
305305

306306
def test_throw_rendering_complexity_exceeded():
307307
plt.rcParams['path.simplify'] = False
308-
xx = np.arange(200000)
309-
yy = np.random.rand(200000)
308+
xx = np.arange(2_000_000)
309+
yy = np.random.rand(2_000_000)
310310
yy[1000] = np.nan
311311

312312
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)
0