[Python-modules-commits] r31128 - in packages/python-html2text/trunk/debian (9 files)

stefanor at users.alioth.debian.org stefanor at users.alioth.debian.org
Sat Oct 18 18:50:47 UTC 2014


    Date: Saturday, October 18, 2014 @ 18:50:46
  Author: stefanor
Revision: 31128

Add autopkgtest suite, running the unit tests.

Added:
  packages/python-html2text/trunk/debian/patches/support-testing-against-installed
  packages/python-html2text/trunk/debian/tests/
  packages/python-html2text/trunk/debian/tests/control
  packages/python-html2text/trunk/debian/tests/unittests
  packages/python-html2text/trunk/debian/tests/unittests3
Modified:
  packages/python-html2text/trunk/debian/changelog
  packages/python-html2text/trunk/debian/control
  packages/python-html2text/trunk/debian/patches/series
  packages/python-html2text/trunk/debian/rules

Modified: packages/python-html2text/trunk/debian/changelog
===================================================================
--- packages/python-html2text/trunk/debian/changelog	2014-10-18 18:15:58 UTC (rev 31127)
+++ packages/python-html2text/trunk/debian/changelog	2014-10-18 18:50:46 UTC (rev 31128)
@@ -15,6 +15,7 @@
   * Update manpage, documenting new arguments.
   * Bump Standards-Version to 3.9.6, no changes needed.
   * Bump X-Python-Version to >= 2.4, 2.3 compatibility isn't claimed any more.
+  * Add autopkgtest suite, running the unit tests.
 
  -- Stefano Rivera <stefanor at debian.org>  Fri, 17 Oct 2014 20:59:53 -0700
 

Modified: packages/python-html2text/trunk/debian/control
===================================================================
--- packages/python-html2text/trunk/debian/control	2014-10-18 18:15:58 UTC (rev 31127)
+++ packages/python-html2text/trunk/debian/control	2014-10-18 18:50:46 UTC (rev 31128)
@@ -16,6 +16,7 @@
 Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-html2text/trunk/
 X-Python-Version: >= 2.4
 X-Python3-Version: >= 3.0
+XS-Testsuite: autopkgtest
 
 Package: python-html2text
 Architecture: all

Modified: packages/python-html2text/trunk/debian/patches/series
===================================================================
--- packages/python-html2text/trunk/debian/patches/series	2014-10-18 18:15:58 UTC (rev 31127)
+++ packages/python-html2text/trunk/debian/patches/series	2014-10-18 18:50:46 UTC (rev 31128)
@@ -1 +1,2 @@
 skip-install-tests
+support-testing-against-installed

Added: packages/python-html2text/trunk/debian/patches/support-testing-against-installed
===================================================================
--- packages/python-html2text/trunk/debian/patches/support-testing-against-installed	                        (rev 0)
+++ packages/python-html2text/trunk/debian/patches/support-testing-against-installed	2014-10-18 18:50:46 UTC (rev 31128)
@@ -0,0 +1,19 @@
+Description: Don't hardcode the path to the installed binary
+ This allows us to run the same test suite against an installed version of the
+ library.
+Author: Stefano Rivera <stefanor at debian.org>
+Forwarded: https://github.com/Alir3z4/html2text/pull/37
+Last-Update: 2014-10-18
+
+--- a/test/test_html2text.py
++++ b/test/test_html2text.py
+@@ -39,8 +39,7 @@
+ 
+ def test_command(fn, *args):
+     args = list(args)
+-    cmd_name = os.path.join(os.path.dirname(fn), '..', 'html2text/__init__.py')
+-    cmd = [sys.executable, cmd_name]
++    cmd = [sys.executable, '-m', 'html2text.__init__']
+ 
+     if '--googledoc' in args:
+         args.remove('--googledoc')

Modified: packages/python-html2text/trunk/debian/rules
===================================================================
--- packages/python-html2text/trunk/debian/rules	2014-10-18 18:15:58 UTC (rev 31127)
+++ packages/python-html2text/trunk/debian/rules	2014-10-18 18:50:46 UTC (rev 31128)
@@ -3,6 +3,9 @@
 %:
 	dh $@ --buildsystem pybuild --with python2,python3
 
+override_dh_auto_test:
+	dh_auto_test -- --test-args $(CURDIR)/test
+
 override_dh_auto_install:
 	dh_auto_install -- --after-install \
 	    'mv {destdir}/usr/bin/html2text {destdir}/usr/bin/html2markdown.py{version.major}'

Added: packages/python-html2text/trunk/debian/tests/control
===================================================================
--- packages/python-html2text/trunk/debian/tests/control	                        (rev 0)
+++ packages/python-html2text/trunk/debian/tests/control	2014-10-18 18:50:46 UTC (rev 31128)
@@ -0,0 +1,5 @@
+Tests: unittests
+Depends: python-all, python-html2text
+
+Tests: unittests3
+Depends: python3-all, python3-html2text

Added: packages/python-html2text/trunk/debian/tests/unittests
===================================================================
--- packages/python-html2text/trunk/debian/tests/unittests	                        (rev 0)
+++ packages/python-html2text/trunk/debian/tests/unittests	2014-10-18 18:50:46 UTC (rev 31128)
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -efu
+
+pys="$(pyversions -r 2> /dev/null)"
+
+cp -a test "$ADTTMP"
+
+cd "$ADTTMP"
+
+for py in $pys; do
+	echo "=== $py ==="
+	$py -m unittest discover -v test 2>&1
+done


Property changes on: packages/python-html2text/trunk/debian/tests/unittests
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/python-html2text/trunk/debian/tests/unittests3
===================================================================
--- packages/python-html2text/trunk/debian/tests/unittests3	                        (rev 0)
+++ packages/python-html2text/trunk/debian/tests/unittests3	2014-10-18 18:50:46 UTC (rev 31128)
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -efu
+
+pys="$(py3versions -r 2> /dev/null)"
+
+cp -a test "$ADTTMP"
+
+cd "$ADTTMP"
+
+for py in $pys; do
+	echo "=== $py ==="
+	$py -m unittest discover -v test 2>&1
+done


Property changes on: packages/python-html2text/trunk/debian/tests/unittests3
___________________________________________________________________
Added: svn:executable
   + *




More information about the Python-modules-commits mailing list