[Python-modules-commits] [django-nose] 01/07: Convert from git-dpm to patches unapplied format
Michael Fladischer
fladi at moszumanska.debian.org
Tue Oct 17 18:09:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch debian/master
in repository django-nose.
commit bb2c1873b00d0e9bfc6911287ed2e93dc3b7e402
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Tue Oct 17 18:11:11 2017 +0200
Convert from git-dpm to patches unapplied format
---
debian/.git-dpm | 11 -----------
debian/gbp.conf | 4 +---
runtests.sh | 35 +++++++++++++++--------------------
testapp/settings.py | 14 ++++++++++----
4 files changed, 26 insertions(+), 38 deletions(-)
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index b01ccc5..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-805d34fb894946b64255c5e38c50a46e122770b9
-805d34fb894946b64255c5e38c50a46e122770b9
-99d0c63b56756d6b0f1d83e1d827158fa6493b02
-99d0c63b56756d6b0f1d83e1d827158fa6493b02
-django-nose_1.4.4.orig.tar.gz
-0201d22380ac6b801ce2710c6a0c693a0cf1ce71
-44266
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 45052a1..3879982 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,4 +1,2 @@
[DEFAULT]
-upstream-branch = upstream
-debian-branch = master
-pristine-tar = True
+debian-branch=debian/master
diff --git a/runtests.sh b/runtests.sh
index 588c46c..da6ee27 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -36,13 +36,8 @@ 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:
@@ -151,45 +146,45 @@ django_test() {
TESTAPP_COUNT=6
reset_env
-django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'normal settings'
+django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'normal settings'
reset_env
export TEST_RUNNER="django_nose.NoseTestSuiteRunner"
-django_test "$PYTHON /usr/bin/django-admin test $NOINPUT" $TESTAPP_COUNT 'test runner from environment'
+django_test "./manage.py test $NOINPUT" $TESTAPP_COUNT 'test runner from environment'
reset_env
-django_test "$PYTHON testapp/runtests.py testapp.test_only_this" 1 'via run_tests API'
+django_test "testapp/runtests.py testapp.test_only_this" 1 'via run_tests API'
reset_env
export NOSE_PLUGINS="testapp.plugins.SanityCheckPlugin"
-django_test "$PYTHON /usr/bin/django-admin test testapp/plugin_t $NOINPUT" 1 'with plugins'
+django_test "./manage.py test testapp/plugin_t $NOINPUT" 1 'with plugins'
reset_env
-django_test "$PYTHON /usr/bin/django-admin test unittests $NOINPUT" 4 'unittests'
+django_test "./manage.py test unittests $NOINPUT" 4 'unittests'
reset_env
-django_test "$PYTHON /usr/bin/django-admin test unittests --verbosity 1 $NOINPUT" 4 'argument option without equals'
+django_test "./manage.py test unittests --verbosity 1 $NOINPUT" 4 'argument option without equals'
reset_env
-django_test "$PYTHON /usr/bin/django-admin test unittests --nose-verbosity=2 $NOINPUT" 4 'argument with equals'
+django_test "./manage.py test unittests --nose-verbosity=2 $NOINPUT" 4 'argument with equals'
reset_env
-django_test "$PYTHON /usr/bin/django-admin test unittests --testrunner=testapp.custom_runner.CustomNoseTestSuiteRunner $NOINPUT" 4 'unittests with testrunner'
+django_test "./manage.py test unittests --testrunner=testapp.custom_runner.CustomNoseTestSuiteRunner $NOINPUT" 4 'unittests with testrunner'
reset_env
-django_test "$PYTHON /usr/bin/django-admin test unittests --attr special $NOINPUT" 1 'select by attribute'
+django_test "./manage.py test unittests --attr special $NOINPUT" 1 'select by attribute'
-#reset_env
-#export REUSE_DB=1
+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 "$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'
+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'
if [ "$HAS_HOTSHOT" = "1" ]
then
# Python 3 doesn't support the hotshot profiler. See nose#842.
reset_env
- django_test "$PYTHON /usr/bin/django-admin test $NOINPUT --with-profile --profile-restrict less_output" $TESTAPP_COUNT 'with profile plugin'
+ django_test "./manage.py test $NOINPUT --with-profile --profile-restrict less_output" $TESTAPP_COUNT 'with profile plugin'
fi
diff --git a/testapp/settings.py b/testapp/settings.py
index 1f23cdd..51a157f 100644
--- a/testapp/settings.py
+++ b/testapp/settings.py
@@ -11,13 +11,19 @@ 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': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': path.join(BASE_DIR, 'testapp.sqlite3'),
- }
+ 'default':
+ dj_database_url.config(
+ default='sqlite:///' + rel_path('testapp.sqlite3'))
}
MIDDLEWARE_CLASSES = ()
--
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