File: backend-base

package info (click to toggle)
matplotlib 3.10.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 78,352 kB
  • sloc: python: 147,118; cpp: 62,988; objc: 1,679; ansic: 1,426; javascript: 786; makefile: 104; sh: 53
file content (29 lines) | stat: -rwxr-xr-x 521 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
set -efu

export HOME=$AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP

echo "=== $BACKEND ==="

cat << EOF > test.py
# https://github.com/matplotlib/matplotlib/issues/3505
import sys
sys.ps1 = 'SOMETHING'
import matplotlib
matplotlib.use("$BACKEND")
import matplotlib.pyplot as plt

plt.ion()
plt.plot(range(5), range(5))
plt.show()
plt.gca().figure.canvas.draw()
plt.savefig('test.png')
EOF

for py in $pys; do
    echo "=== $py ==="
    xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" $py test.py
    rm test.png
done