Package: pyparsing
Version: 1.5.6+dfsg1-2
Severity: wishlist
Tags: patch

attached basic autopkgtests for pyparsing that verifies it the package
can be imported and some functionality works.
diff -Nru pyparsing-1.5.6+dfsg1/debian/tests/control pyparsing-1.5.6+dfsg1/debian/tests/control
--- pyparsing-1.5.6+dfsg1/debian/tests/control	1970-01-01 01:00:00.000000000 +0100
+++ pyparsing-1.5.6+dfsg1/debian/tests/control	2013-04-28 12:07:43.000000000 +0200
@@ -0,0 +1,5 @@
+Tests: import-py2
+Depends: python-pyparsing, python-all
+
+Tests: import-py3
+Depends: python3-pyparsing, python3-all
diff -Nru pyparsing-1.5.6+dfsg1/debian/tests/import-py2 pyparsing-1.5.6+dfsg1/debian/tests/import-py2
--- pyparsing-1.5.6+dfsg1/debian/tests/import-py2	1970-01-01 01:00:00.000000000 +0100
+++ pyparsing-1.5.6+dfsg1/debian/tests/import-py2	2013-04-28 12:07:43.000000000 +0200
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -efu
+
+PYS=${PYS:-"$(pyversions -r 2>/dev/null)"}
+
+cd $ADTTMP
+for py in $PYS; do
+    echo "=== $py ==="
+    fn=$($py -c "import pyparsing; print(pyparsing.__file__)")
+    # runs some basic functions, output looks like errors but its intentional
+    $py $fn
+done
+
diff -Nru pyparsing-1.5.6+dfsg1/debian/tests/import-py3 pyparsing-1.5.6+dfsg1/debian/tests/import-py3
--- pyparsing-1.5.6+dfsg1/debian/tests/import-py3	1970-01-01 01:00:00.000000000 +0100
+++ pyparsing-1.5.6+dfsg1/debian/tests/import-py3	2013-04-28 12:07:43.000000000 +0200
@@ -0,0 +1,13 @@
+#!/bin/bash
+set -efu
+
+PYS=${PYS:-"$(py3versions -r 2>/dev/null)"}
+
+cd $ADTTMP
+for py in $PYS; do
+    echo "=== $py ==="
+    fn=$($py -c "import pyparsing; print(pyparsing.__file__)")
+    # runs some basic functions, output looks like errors but its intentional
+    $py $fn
+done
+

Reply via email to