[Python-modules-commits] [django-nose] 06/10: merge patched into master
Michael Fladischer
fladi at moszumanska.debian.org
Thu Jan 7 13:03:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch master
in repository django-nose.
commit e4943cc4da4a512259d56825f11d6546dcf6a96d
Merge: 871c216 a0f484f
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Thu Jan 7 12:52:28 2016 +0100
merge patched into master
AUTHORS.rst | 3 +
README.rst | 2 +-
changelog.rst | 11 +++
debian/.git-dpm | 6 +-
...unnecessary-dependency-on-dj_database_url.patch | 2 +-
debian/patches/django17.patch | 2 +-
debian/patches/runtests.patch | 18 +++--
django_nose/__init__.py | 2 +-
django_nose/management/commands/test.py | 1 -
django_nose/plugin.py | 5 --
django_nose/runner.py | 93 ++++++++++++++++------
django_nose/testcases.py | 1 -
django_nose/tools.py | 1 -
requirements.txt | 4 +-
runtests.sh | 6 ++
setup.cfg | 2 +-
setup.py | 4 +-
testapp/custom_runner.py | 1 -
testapp/models.py | 2 -
testapp/plugins.py | 1 -
testapp/tests.py | 3 -
tox.ini | 9 ++-
unittests/test_databases.py | 3 +-
23 files changed, 123 insertions(+), 59 deletions(-)
diff --cc debian/.git-dpm
index ac1d133,0000000..c3b1c14
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
+# see git-dpm(1) from git-dpm package
- 2790fc210342b770f5aad012f0d445d4087da926
- 2790fc210342b770f5aad012f0d445d4087da926
- 4ee0cc56a19788fb299a20d2f63e361a7caf0927
++a0f484fe26b8df32f8a5b26a961dcc88340b1cd5
++a0f484fe26b8df32f8a5b26a961dcc88340b1cd5
++d418be775674518b1226ef5039f7f36ec4b8d84d
+d418be775674518b1226ef5039f7f36ec4b8d84d
+django-nose_1.4.3.orig.tar.gz
+2aaf28915cac4d52b8c1ceb586f3b7a09e278480
+42647
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --cc debian/patches/0003-Remove-unnecessary-dependency-on-dj_database_url.patch
index 275f575,0000000..bdb3b84
mode 100644,000000..100644
--- a/debian/patches/0003-Remove-unnecessary-dependency-on-dj_database_url.patch
+++ b/debian/patches/0003-Remove-unnecessary-dependency-on-dj_database_url.patch
@@@ -1,39 -1,0 +1,39 @@@
- From 2790fc210342b770f5aad012f0d445d4087da926 Mon Sep 17 00:00:00 2001
++From a0f484fe26b8df32f8a5b26a961dcc88340b1cd5 Mon Sep 17 00:00:00 2001
+From: Michael Fladischer <FladischerMichael at fladi.at>
+Date: Fri, 16 Oct 2015 12:26:16 +0200
+Subject: Remove unnecessary dependency on dj_database_url.
+
+Importing dj_database_url for a simple test application is not necessary,
+replace the static database configuration with a defautl one from Django.
+---
+ testapp/settings.py | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/testapp/settings.py b/testapp/settings.py
+index d204545..9059560 100644
+--- a/testapp/settings.py
++++ b/testapp/settings.py
+@@ -11,19 +11,13 @@ NOSE_PLUGINS - Comma-separated list of plugins to add
+ from __future__ import print_function
+ from os import environ, path
+
+-import dj_database_url
+-
+ BASE_DIR = path.dirname(path.dirname(__file__))
+
+-
+-def rel_path(*subpaths):
+- """Construct the full path given a relative path."""
+- return path.join(BASE_DIR, *subpaths)
+-
+ DATABASES = {
+- 'default':
+- dj_database_url.config(
+- default='sqlite:///' + rel_path('testapp.sqlite3'))
++ 'default': {
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'NAME': path.join(BASE_DIR, 'testapp.sqlite3'),
++ }
+ }
+
+ MIDDLEWARE_CLASSES = ()
diff --cc debian/patches/django17.patch
index e7e6795,0000000..2adcd6c
mode 100644,000000..100644
--- a/debian/patches/django17.patch
+++ b/debian/patches/django17.patch
@@@ -1,32 -1,0 +1,32 @@@
- From d1901b7b4feaa8f9318857ce88008b75713dc97c Mon Sep 17 00:00:00 2001
++From d039769e81eba6f09d1dd8dd2630ab027df6a3bc Mon Sep 17 00:00:00 2001
+From: Brian May <bam at debian.org>
+Date: Thu, 8 Oct 2015 08:54:27 -0700
+Subject: Call django.setup() befor running the tests.
+
+Last-Update: 2014-09-29
+Forwarded: no
+Bug-Debian: https://bugs.debian.org/763252
+
+Patch-Name: django17.patch
+---
+ testapp/runtests.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/testapp/runtests.py b/testapp/runtests.py
+index b1ac91e..b3208a4 100755
+--- a/testapp/runtests.py
++++ b/testapp/runtests.py
+@@ -2,6 +2,7 @@
+ """Configure enough Django to run the test suite."""
+ import sys
+
++import django
+ from django.conf import settings
+
+ if not settings.configured:
+@@ -21,4 +22,5 @@ def runtests(*test_labels):
+
+
+ if __name__ == '__main__':
++ django.setup()
+ runtests(*sys.argv[1:])
diff --cc debian/patches/runtests.patch
index aa8aff9,0000000..32087ee
mode 100644,000000..100644
--- a/debian/patches/runtests.patch
+++ b/debian/patches/runtests.patch
@@@ -1,93 -1,0 +1,101 @@@
- From a439c23f43f0b86743c1b821c6d148f4af823f1b Mon Sep 17 00:00:00 2001
++From 7103f0c63468ba6d1c93202613c812a68ad72994 Mon Sep 17 00:00:00 2001
+From: Michael Fladischer <fladi at debian.org>
+Date: Thu, 8 Oct 2015 08:54:28 -0700
+Subject: Enable non-default python versions for test runs
+
+ The original version of runtests.sh only allows to run the tests on the current
+ default python version. This patch add the environment variable PYTHON that can
+ be set to a specific python binary (e.g. python2.6) to run the tests with.
+ It also changes the path for django-admin.py to the one supplied by the
+ python-django package.
+Last-Update: 2011-11-26
+Forwarded: no
+
+Patch-Name: runtests.patch
+---
- runtests.sh | 29 +++++++++++++++++------------
- 1 file changed, 17 insertions(+), 12 deletions(-)
++ runtests.sh | 33 +++++++++++++++++++--------------
++ 1 file changed, 19 insertions(+), 14 deletions(-)
+
+diff --git a/runtests.sh b/runtests.sh
- index 38a01f0..27cdb85 100755
++index f825e3a..e66c055 100755
+--- a/runtests.sh
++++ b/runtests.sh
+@@ -36,8 +36,13 @@ then
+ fi
+
+ export PYTHONPATH=.
++if [ -z $PYTHON ]; then
++ export PYTHON=python
++fi
++
++export DJANGO_SETTINGS_MODULE=testapp.settings
+
+-HAS_HOTSHOT=$(python -c "\
++HAS_HOTSHOT=$($PYTHON -c "\
+ try:
+ import hotshot
+ except ImportError:
- @@ -147,44 +152,44 @@ django_test() {
++@@ -147,50 +152,50 @@ django_test() {
+ TESTAPP_COUNT=6
+
+ reset_env
+-django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'normal settings'
++django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'normal settings'
+
+-DJANGO_VERSION=`./manage.py version | cut -d. -f1-2`
++DJANGO_VERSION=`$PYTHON /usr/bin/django-admin version | cut -d. -f1-2`
+ if [ "$DJANGO_VERSION" = "1.4" -o "$DJANGO_VERSION" = "1.5" -o "$DJANGO_VERSION" = "1.6" ]
+ then
+ reset_env
+ export USE_SOUTH=1
+- django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'with south in installed apps'
++ django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'with south in installed apps'
+ fi
+
+ reset_env
+ export TEST_RUNNER="django_nose.run_tests"
+-django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'django_nose.run_tests format'
++django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'django_nose.run_tests format'
+
+ reset_env
+-django_test "testapp/runtests.py testapp.test_only_this" 1 'via run_tests API'
++django_test "$PYTHON testapp/runtests.py testapp.test_only_this" 1 'via run_tests API'
+
+ reset_env
+ export NOSE_PLUGINS="testapp.plugins.SanityCheckPlugin"
+-django_test "./manage.py test testapp/plugin_t $NOINPUT" 1 'with plugins'
++django_test "$PYTHON /usr/bin/django-admin test testapp/plugin_t $NOINPUT" 1 'with plugins'
+
+ reset_env
+-django_test "./manage.py test unittests $NOINPUT" 4 'unittests'
++django_test "$PYTHON /usr/bin/django-admin test unittests $NOINPUT" 4 'unittests'
+
+ reset_env
++-django_test "./manage.py test unittests --verbosity 1 $NOINPUT" 4 'argument option without equals'
+++django_test "$PYTHON /usr/bin/django-admin test unittests --verbosity 1 $NOINPUT" 4 'argument option without equals'
++
++ reset_env
+-django_test "./manage.py test unittests --testrunner=testapp.custom_runner.CustomNoseTestSuiteRunner $NOINPUT" 4 'unittests with testrunner'
++django_test "$PYTHON /usr/bin/django-admin test unittests --testrunner=testapp.custom_runner.CustomNoseTestSuiteRunner $NOINPUT" 4 'unittests with testrunner'
+
+ reset_env
++-django_test "./manage.py test unittests --attr special $NOINPUT" 1 'select by attribute'
+++django_test "$PYTHON /usr/bin/django-admin test unittests --attr special $NOINPUT" 1 'select by attribute'
++
++ reset_env
+ export REUSE_DB=1
+ # For the many issues with REUSE_DB=1, see:
+ # https://github.com/django-nose/django-nose/milestones/Fix%20REUSE_DB=1
+-django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'with REUSE_DB=1, call #1' 'can fail'
+-django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'with REUSE_DB=1, call #2' 'can fail'
++django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'with REUSE_DB=1, call #1' 'can fail'
++django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'with REUSE_DB=1, call #2' 'can fail'
+
+
+ if [ "$HAS_HOTSHOT" = "1" ]
+ then
+ # Python 3 doesn't support the hotshot profiler. See nose#842.
+ reset_env
+- django_test "./manage.py test $NOINPUT --with-profile --profile-restrict less_output" $TESTAPP_COUNT 'with profile plugin'
++ django_test "$PYTHON /usr/bin/django-admin test $NOINPUT --with-profile --profile-restrict less_output" $TESTAPP_COUNT 'with profile plugin'
+ fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-nose.git
More information about the Python-modules-commits
mailing list