[Python-modules-commits] [python-django] 10/10: Improve DEP-8 tests
Raphaël Hertzog
hertzog at moszumanska.debian.org
Tue Jan 5 13:37:24 UTC 2016
This is an automated email from the git hooks/post-receive script.
hertzog pushed a commit to branch debian/jessie-backports
in repository python-django.
commit cea8efc760637d52fe47d9536e919da0fc8d63aa
Author: Raphaël Hertzog <hertzog at debian.org>
Date: Tue Jan 5 12:20:46 2016 +0100
Improve DEP-8 tests
---
debian/tests/control | 6 +++---
debian/tests/django-admin | 13 +------------
debian/tests/django-admin-py3 | 1 -
debian/tests/test-suite | 19 ++++++-------------
debian/tests/test-suite-py3 | 1 -
5 files changed, 10 insertions(+), 30 deletions(-)
diff --git a/debian/tests/control b/debian/tests/control
index 60eccf2..d62e0c1 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,9 +1,9 @@
-Tests: django-admin
+Test-Command: debian/tests/django-admin --with python2
Depends: python-django
-Tests: django-admin-py3
+Test-Command: debian/tests/django-admin --with python3
Depends: python3-django
-Tests: test-suite, test-suite-py3
+Test-Command: debian/tests/test-suite python2 python3
Restrictions: allow-stderr, needs-recommends
Depends: @, @builddeps@
diff --git a/debian/tests/django-admin b/debian/tests/django-admin
old mode 100644
new mode 100755
index 41c3246..d4b2dc6
--- a/debian/tests/django-admin
+++ b/debian/tests/django-admin
@@ -18,15 +18,6 @@ run() {
$@
}
-case $0 in
- *-py3)
- python=python3
- ;;
- *)
- python=python2
- ;;
-esac
-
# Test startproject
cd $ADTTMP
run django-admin startproject testproject
@@ -40,6 +31,4 @@ run django-admin startapp testapp
ensure_files_exist testapp/models.py testapp/tests.py testapp/views.py
# Test manage.py
-# ./manage.py hardcodes python3, so we have to call the correct/available
-# python interpreter explicitly
-run $python ./manage.py check
+./manage.py check
diff --git a/debian/tests/django-admin-py3 b/debian/tests/django-admin-py3
deleted file mode 120000
index 1898c7d..0000000
--- a/debian/tests/django-admin-py3
+++ /dev/null
@@ -1 +0,0 @@
-django-admin
\ No newline at end of file
diff --git a/debian/tests/test-suite b/debian/tests/test-suite
old mode 100644
new mode 100755
index 8757deb..edc5740
--- a/debian/tests/test-suite
+++ b/debian/tests/test-suite
@@ -2,17 +2,10 @@
set -e
-case $0 in
- *-py3)
- python=python3
- ;;
- *)
- python=python2
- ;;
-esac
+cp -a tests $ADTTMP/tests
+cd $ADTTMP/tests
-cp -a tests $ADTTMP/django-tests
-cd $ADTTMP/django-tests
-
-echo "Running “$python ./runtests.py --verbosity 2”"
-LC_ALL=C.UTF-8 $python ./runtests.py --verbosity 2 --parallel 1
+for python in "$@"; do
+ echo "Running “$python ./runtests.py --verbosity 2”"
+ LC_ALL=C.UTF-8 $python ./runtests.py --verbosity 2
+done
diff --git a/debian/tests/test-suite-py3 b/debian/tests/test-suite-py3
deleted file mode 120000
index a81fe93..0000000
--- a/debian/tests/test-suite-py3
+++ /dev/null
@@ -1 +0,0 @@
-test-suite
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git
More information about the Python-modules-commits
mailing list