| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
cp -a debian/tests/packages "$AUTOPKGTEST_TMP" |
| 4 |
dist_packages=/usr/local/lib/python3.14/dist-packages |
| 5 |
|
| 6 |
setUp() { |
| 7 |
mount -t tmpfs tmpfs $dist_packages |
| 8 |
} |
| 9 |
|
| 10 |
tearDown() { |
| 11 |
umount $dist_packages |
| 12 |
} |
| 13 |
|
| 14 |
testFibPy() { |
| 15 |
cd "$AUTOPKGTEST_TMP/packages/fibpy" |
| 16 |
python3.14 setup.py install |
| 17 |
assertTrue 'Install fibpy in /usr/local' $? |
| 18 |
assertTrue 'fibpy was installed to /usr/local' "[ -e $dist_packages/fibpy-*.egg ]" |
| 19 |
cd "$AUTOPKGTEST_TMP" |
| 20 |
stdout=$(python3.14 -m fibpy 5) |
| 21 |
assertTrue 'Execute fibpy from /usr/local' $? |
| 22 |
assertEquals 'Correct result' 8 "$stdout" |
| 23 |
} |
| 24 |
|
| 25 |
testFibC() { |
| 26 |
cd "$AUTOPKGTEST_TMP/packages/fibc" |
| 27 |
python3.14 setup.py install |
| 28 |
assertTrue 'Install fibc in /usr/local' $? |
| 29 |
assertTrue 'fibc was installed to /usr/local' "[ -e $dist_packages/fibc-*.egg ]" |
| 30 |
cd "$AUTOPKGTEST_TMP" |
| 31 |
stdout=$(python3.14 -c 'from fibc import fib; print(fib(5))') |
| 32 |
assertTrue 'Execute fibc from /usr/local' $? |
| 33 |
assertEquals 'Correct result' 8 "$stdout" |
| 34 |
} |
| 35 |
|
| 36 |
testFibPyDevelop() { |
| 37 |
cd "$AUTOPKGTEST_TMP/packages/fibpy" |
| 38 |
python3.14 setup.py develop |
| 39 |
assertTrue 'Install editable fibpy in /usr/local' $? |
| 40 |
assertTrue 'fibpy was linked to /usr/local' "[ -e $dist_packages/fibpy.egg-link ]" |
| 41 |
cd "$AUTOPKGTEST_TMP" |
| 42 |
stdout=$(python3.14 -m fibpy 5) |
| 43 |
assertTrue 'Execute editable fibpy from /usr/local' $? |
| 44 |
assertEquals 'Correct result' 8 "$stdout" |
| 45 |
} |
| 46 |
|
| 47 |
testFibPyPip() { |
| 48 |
cd "$AUTOPKGTEST_TMP" |
| 49 |
python3.14 -m pip install --break-system-packages --no-build-isolation \ |
| 50 |
-v "$AUTOPKGTEST_TMP/packages/fibpy" |
| 51 |
assertTrue 'Install fibpy via pip in /usr/local' $? |
| 52 |
assertTrue 'fibpy was installed to /usr/local' "[ -e $dist_packages/fibpy.py ]" |
| 53 |
stdout=$(python3.14 -m fibpy 5) |
| 54 |
assertTrue 'Execute fibpy from /usr/local' $? |
| 55 |
assertEquals 'Correct result' 8 "$stdout" |
| 56 |
} |
| 57 |
|
| 58 |
testFibPyPipEditable() { |
| 59 |
cd "$AUTOPKGTEST_TMP" |
| 60 |
python3.14 -m pip install --no-build-isolation --break-system-packages\ |
| 61 |
-v -e "$AUTOPKGTEST_TMP/packages/fibpy" |
| 62 |
assertTrue 'Install editable fibpy via pip in /usr/local' $? |
| 63 |
assertTrue 'fibpy was linked to /usr/local' "[ -e $dist_packages/__editable__.fibpy-42.0.0.pth ]" |
| 64 |
stdout=$(python3.14 -m fibpy 5) |
| 65 |
assertTrue 'Execute fibpy from /usr/local' $? |
| 66 |
assertEquals 'Correct result' 8 "$stdout" |
| 67 |
} |
| 68 |
|
| 69 |
. shunit2 |