[Python-modules-team] Bug#890511: python-jmespath: Add autopkgtests to python-jmespath

Corey Bryant corey.bryant at canonical.com
Thu Feb 15 13:10:40 UTC 2018


Package: python-jmespath
Version: 0.9.3-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu bionic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/tests: Add basic autopkgtests to test module imports.


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers bionic
  APT policy: (500, 'bionic'), (500, 'artful-updates')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.13.0-32-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru python-jmespath-0.9.3/debian/tests/control python-jmespath-0.9.3/debian/tests/control
--- python-jmespath-0.9.3/debian/tests/control	1969-12-31 19:00:00.000000000 -0500
+++ python-jmespath-0.9.3/debian/tests/control	2018-02-14 15:22:36.000000000 -0500
@@ -0,0 +1,3 @@
+Tests: python-jmespath python3-jmespath
+Depends: python-jmespath, python3-jmespath
+Restrictions: needs-root
diff -Nru python-jmespath-0.9.3/debian/tests/python3-jmespath python-jmespath-0.9.3/debian/tests/python3-jmespath
--- python-jmespath-0.9.3/debian/tests/python3-jmespath	1969-12-31 19:00:00.000000000 -0500
+++ python-jmespath-0.9.3/debian/tests/python3-jmespath	2018-02-14 15:22:36.000000000 -0500
@@ -0,0 +1,14 @@
+#!/bin/bash
+#-------------------------
+# Testing python3-jmespath
+#-------------------------
+set -e
+
+result=$(python3 `dirname $0`/test_import_jmespath.py 2>&1)
+if [ "$result" ]; then
+    echo "ERROR: PYTHON3-JMESPATH MODULE CANNOT BE IMPORTED"
+    exit 1
+else
+    echo "OK"
+    exit 0
+fi
diff -Nru python-jmespath-0.9.3/debian/tests/python-jmespath python-jmespath-0.9.3/debian/tests/python-jmespath
--- python-jmespath-0.9.3/debian/tests/python-jmespath	1969-12-31 19:00:00.000000000 -0500
+++ python-jmespath-0.9.3/debian/tests/python-jmespath	2018-02-14 15:22:36.000000000 -0500
@@ -0,0 +1,14 @@
+#!/bin/bash
+#-------------------------
+# Testing python-jmespath
+#-------------------------
+set -e
+
+result=$(python2 `dirname $0`/test_import_jmespath.py 2>&1)
+if [ "$result" ]; then
+    echo "ERROR: PYTHON-JMESPATH MODULE CANNOT BE IMPORTED"
+    exit 1
+else
+    echo "OK"
+    exit 0
+fi
diff -Nru python-jmespath-0.9.3/debian/tests/test_import_jmespath.py python-jmespath-0.9.3/debian/tests/test_import_jmespath.py
--- python-jmespath-0.9.3/debian/tests/test_import_jmespath.py	1969-12-31 19:00:00.000000000 -0500
+++ python-jmespath-0.9.3/debian/tests/test_import_jmespath.py	2018-02-14 15:22:36.000000000 -0500
@@ -0,0 +1,4 @@
+try:
+    import jmespath
+except ImportError as e:
+    print("ERROR IMPORTING MODULE")


More information about the Python-modules-team mailing list