Skip to content

Commit c19d49f

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 4d9db1e commit c19d49f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/matplotlib/tests/test_agg.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ 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)
83-
fig.savefig(buff, format='png')
83+
fig.savefig(buff, format='png', dpi=500)
8484

8585

8686
@image_comparison(['agg_filter.png'], remove_text=True)

lib/matplotlib/tests/test_simplification.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ def test_start_with_moveto():
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)