Commit d1922f57 authored by Raphaël Hertzog's avatar Raphaël Hertzog

Add some DEP-8 tests

They test "django-admin" and run the test suite against the installed
package. In both cases, we do it with python2 and python3.
parent 53451ea9
python-django (1.9-2) UNRELEASED; urgency=medium
[ Chris Lamb ]
* Use dpkg-maintscript-helper's dir_to_symlink to correctly replace the
app_template and project_template symlinks added in 1.9~rc2-2.
(Closes: #807683)
[ Raphaël Hertzog ]
* Add some DEP-8 tests testing "django-admin" and running the test suite
against the installed package. In both cases, we do it with python2 and
python3.
-- Chris Lamb <lamby@debian.org> Sat, 12 Dec 2015 21:02:28 +0200
python-django (1.9-1) unstable; urgency=medium
......
Tests: django-admin
Depends: python-django
Tests: django-admin-py3
Depends: python3-django
Tests: test-suite, test-suite-py3
Restrictions: allow-stderr, needs-recommends
Depends: @, @builddeps@
#!/bin/sh
set -e
ensure_files_exist() {
for f in "$@"; do
if [ ! -e $f ]; then
echo "ERROR: $f does not exist" >&2
exit 1
else
echo "OK: $f is there"
fi
done
}
run() {
echo "Running “$@”"
$@
}
case $0 in
*-py3)
python=python3
;;
*)
python=python2
;;
esac
# Test startproject
cd $ADTTMP
run django-admin startproject testproject
ensure_files_exist testproject/manage.py testproject/testproject/settings.py
# Test startapp
cd testproject
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
django-admin
\ No newline at end of file
#!/bin/sh
set -e
case $0 in
*-py3)
python=python3
;;
*)
python=python2
;;
esac
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
test-suite
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment