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 30 31 32 33
|
#!/bin/sh
cp -a debian/tests/packages "$AUTOPKGTEST_TMP"
setUp() {
mount -t tmpfs tmpfs /usr/local/lib/python3.9/dist-packages
}
tearDown() {
umount /usr/local/lib/python3.9/dist-packages
}
testFibPy() {
cd "$AUTOPKGTEST_TMP/packages/fibpy"
python3.9 setup.py install
assertTrue 'Install fibpy in /usr/local' $?
cd "$AUTOPKGTEST_TMP"
stdout=$(python3.9 -m fibpy 5)
assertTrue 'Execute fibpy from a virtualenv' $?
assertEquals 'Correct result' 8 "$stdout"
}
testFibC() {
cd "$AUTOPKGTEST_TMP/packages/fibc"
python3.9 setup.py install
assertTrue 'Install fibc in /usr/local' $?
cd "$AUTOPKGTEST_TMP"
stdout=$(python3.9 -c 'from fibc import fib; print(fib(5))')
assertTrue 'Execute fibc from a virtualenv' $?
assertEquals 'Correct result' 8 "$stdout"
}
. shunit2
|