File: test-example-code

package info (click to toggle)
python-first 2.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 124 kB
  • sloc: python: 90; sh: 12; makefile: 7
file content (19 lines) | stat: -rwxr-xr-x 300 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

set -e

at_exit() {
    echo "info: test exiting"
}
trap at_exit INT TERM EXIT

cp test_first.py $AUTOPKGTEST_TMP

# Switch to the tmp directory
cd $AUTOPKGTEST_TMP

if python3 test_first.py 2>&1; then
  echo "success: test ran without error"
else
  echo "failure: test returned error"
fi