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

Skip to content

Commit daf7ad5

Browse files
committed
Add test
1 parent bfab80e commit daf7ad5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/matplotlib/tests/test_backend_ps.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import matplotlib
1212
import matplotlib.pyplot as plt
13+
from matplotlib import patheffects
1314
from matplotlib.testing.decorators import cleanup, knownfailureif
1415

1516

@@ -120,6 +121,16 @@ def test_composite_image():
120121
assert buff.count(six.b(' colorimage')) == 2
121122

122123

124+
@cleanup
125+
def test_patheffects():
126+
with matplotlib.rc_context():
127+
matplotlib.rcParams['path.effects'] = [patheffects.withStroke(linewidth=4, foreground='w')]
128+
fig, ax = plt.subplots()
129+
ax.plot([1, 2, 3])
130+
with io.BytesIO() as ps:
131+
fig.savefig(ps, format='ps')
132+
133+
123134
if __name__ == '__main__':
124135
import nose
125136
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

0 commit comments

Comments
 (0)