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

Skip to content

Commit ef87548

Browse files
committed
bug in tests: don't use random data for image comparison tests
1 parent 0a2a0f9 commit ef87548

7 files changed

Lines changed: 645 additions & 650 deletions

File tree

-767 Bytes
Binary file not shown.
-1.88 KB
Loading

lib/matplotlib/tests/baseline_images/test_axes/markevery.svg

Lines changed: 252 additions & 256 deletions
Loading
-1.05 KB
Binary file not shown.
-205 KB
Loading

lib/matplotlib/tests/baseline_images/test_axes/markevery_line.svg

Lines changed: 388 additions & 392 deletions
Loading

lib/matplotlib/tests/test_axes.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ def test_units_strings():
572572

573573
@image_comparison(baseline_images=['markevery'])
574574
def test_markevery():
575-
x, y = np.random.rand(2, 100)
575+
x = np.linspace(0, 10, 100)
576+
y = np.sin(x) * np.sqrt(x/10 + 0.5)
576577

577578
# check marker only plot
578579
fig = plt.figure()
@@ -586,7 +587,9 @@ def test_markevery():
586587

587588
@image_comparison(baseline_images=['markevery_line'])
588589
def test_markevery_line():
589-
x, y = np.random.rand(2, 100)
590+
x = np.linspace(0, 10, 100)
591+
y = np.sin(x) * np.sqrt(x/10 + 0.5)
592+
590593
# check line/marker combos
591594
fig = plt.figure()
592595
ax = fig.add_subplot(111)

0 commit comments

Comments
 (0)