Debian Codegraph @

debian/tests/backend-base

raw
1 #!/bin/sh
2 set -efu
3
4 export HOME=$AUTOPKGTEST_TMP
5 cd $AUTOPKGTEST_TMP
6
7 echo "=== $BACKEND ==="
8
9 cat << EOF > test.py
10 # https://github.com/matplotlib/matplotlib/issues/3505
11 import sys
12 sys.ps1 = 'SOMETHING'
13 import matplotlib
14 matplotlib.use("$BACKEND")
15 import matplotlib.pyplot as plt
16
17 plt.ion()
18 plt.plot(range(5), range(5))
19 plt.show()
20 plt.gca().figure.canvas.draw()
21 plt.savefig('test.png')
22 EOF
23
24 for py in $pys; do
25 echo "=== $py ==="
26 xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" $py test.py
27 rm test.png
28 done
29