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

Skip to content

Commit bc4823f

Browse files
committed
Add spy image test
1 parent 653052b commit bc4823f

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

9.54 KB
Loading

lib/matplotlib/tests/test_axes.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ def test_get_labels():
4343
assert ax.get_ylabel() == 'y label'
4444

4545

46+
@image_comparison(baseline_images=['spy'], extensions=['png'], style='mpl20')
47+
def test_spy():
48+
np.random.seed(19680801)
49+
a = np.ones(32 * 32)
50+
a[:16 * 32] = 0
51+
np.random.shuffle(a)
52+
a = np.reshape(a, (32, 32))
53+
54+
fig, ax = plt.subplots()
55+
ax.spy(a)
56+
57+
4658
@image_comparison(baseline_images=['formatter_ticker_001',
4759
'formatter_ticker_002',
4860
'formatter_ticker_003',

0 commit comments

Comments
 (0)