File: backend-base

package info (click to toggle)
matplotlib 3.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,280 kB
  • sloc: python: 133,763; cpp: 66,599; objc: 1,699; ansic: 1,367; javascript: 765; makefile: 153; sh: 48
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