[Python-modules-commits] r30288 - in packages/configobj/trunk/debian/tests (control unittests)

bdrung at users.alioth.debian.org bdrung at users.alioth.debian.org
Wed Aug 27 15:41:16 UTC 2014


    Date: Wednesday, August 27, 2014 @ 15:41:15
  Author: bdrung
Revision: 30288

Adjust autopkgtests to run pytest for Python 2.x and 3.x.

Modified:
  packages/configobj/trunk/debian/tests/control
  packages/configobj/trunk/debian/tests/unittests

Modified: packages/configobj/trunk/debian/tests/control
===================================================================
--- packages/configobj/trunk/debian/tests/control	2014-08-27 15:17:13 UTC (rev 30287)
+++ packages/configobj/trunk/debian/tests/control	2014-08-27 15:41:15 UTC (rev 30288)
@@ -1,2 +1,2 @@
 Tests: unittests
-Depends: @, python-all, python-unittest2
+Depends: python-all, python-configobj, python-pytest, python3-all, python3-configobj, python3-pytest

Modified: packages/configobj/trunk/debian/tests/unittests
===================================================================
--- packages/configobj/trunk/debian/tests/unittests	2014-08-27 15:17:13 UTC (rev 30287)
+++ packages/configobj/trunk/debian/tests/unittests	2014-08-27 15:41:15 UTC (rev 30288)
@@ -1,17 +1,12 @@
 #!/bin/sh
 set -efu
 
-pythons="$(pyversions -r 2> /dev/null)"
+pythons="$(pyversions -r 2> /dev/null && py3versions -r 2> /dev/null)"
 
 cp -a tests "$ADTTMP"
 cd "$ADTTMP"
 
 for python in $pythons; do
 	echo "=== $python ==="
-	$python tests/test_configobj.py
-	if [ "$python" = "python2.7" ]; then
-		PYTHONWARNINGS=default $python -m unittest discover -s tests
-	else
-		PYTHONWARNINGS=default $python $(which unit2) discover -s tests
-	fi
+	$python -m pytest tests
 done 2>&1




More information about the Python-modules-commits mailing list