Mohd  Bilal pushed to branch master at Debian Med / python-cobra


Commits:
3a244f14 by Mohammed Bilal at 2022-08-25T17:13:53+00:00
Add autopkgtests

- - - - -
4aeb8686 by Mohammed Bilal at 2022-08-25T23:18:28+05:30
remove autopkgtest-pkg-python testsuite

- - - - -
65b2eb53 by Mohammed Bilal at 2022-08-25T23:32:06+05:30
Update test depends

- - - - -


4 changed files:

- debian/control
- − debian/tests/Makefile
- debian/tests/control
- + debian/tests/run-unit-test


Changes:

=====================================
debian/control
=====================================
@@ -2,7 +2,6 @@ Source: python-cobra
 Maintainer: Debian Med Packaging Team 
<[email protected]>
 Uploaders: Afif Elghraoui <[email protected]>
 Section: python
-Testsuite: autopkgtest-pkg-python
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
                dh-python,


=====================================
debian/tests/Makefile deleted
=====================================
@@ -1,12 +0,0 @@
-
-.ONESHELL:
-
-all: py3-test
-
-py3-test: SHELL=python3
-
-%-test:
-       import sys
-       from cobra.test import test_all
-
-       sys.exit(0) if test_all() == 0 else sys.exit(1)


=====================================
debian/tests/control
=====================================
@@ -1,12 +1,11 @@
-Test-Command:
-       export MAKEFILES="$PWD/debian/tests/Makefile";
-       cd $AUTOPKGTEST_TMP && make py3-test
-Depends:
-       make,
-       python3-cobra,
-       python3-pytest,
-       python3-pytest-benchmark,
-       python3-jsonschema,
-       python3-scipy,
-       python3-sbml5
+Tests: run-unit-test
+Depends: @,
+        python3-cobra,
+        python3-pytest,
+        python3-pytest-benchmark,
+        python3-jsonschema,
+        python3-scipy,
+        python3-sbml5,
+        python3-pytest-mock,
+        quilt
 Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -0,0 +1,31 @@
+#!/bin/bash
+set -e
+
+pkg=python-cobra
+CUR_DIR=`pwd`
+
+QUILT_PATCHES=debian/patches quilt push -a || true
+
+export LC_ALL=C.UTF-8
+if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
+  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cp -a ${CUR_DIR}/tests "${AUTOPKGTEST_TMP}"
+
+cd "${AUTOPKGTEST_TMP}"
+
+echo "Running Tests"
+
+for py in $(py3versions -s 2> /dev/null)
+do
+    echo "Testing with $py in $(pwd):"
+    $py -m pytest
+
+done
+
+cd ${CUR_DIR}
+QUILT_PATCHES=debian/patches quilt pop -a || true
+
+echo "PASS"



View it on GitLab: 
https://salsa.debian.org/med-team/python-cobra/-/compare/dbe74dbbc0d816ad1e9471139decd5a4b1dacc4c...65b2eb532af527399b3ff00c914ef7443ed3a5aa

-- 
View it on GitLab: 
https://salsa.debian.org/med-team/python-cobra/-/compare/dbe74dbbc0d816ad1e9471139decd5a4b1dacc4c...65b2eb532af527399b3ff00c914ef7443ed3a5aa
You're receiving this email because of your account on salsa.debian.org.


_______________________________________________
debian-med-commit mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to