Skip to content

Commit

Permalink
Explicitly set score for django-nose plugin
Browse files Browse the repository at this point in the history
- Set score for django-nose
- Update runtests.sh to explicitly check test run return value
- Add test with --with-profile to validate setting score
- Fix #121
- Fix #124
- Fix #136
  • Loading branch information
moeffju authored and jsocol committed Jun 24, 2014
1 parent af943c0 commit 95b9c01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions django_nose/plugin.py
Expand Up @@ -48,6 +48,7 @@ class DjangoSetUpPlugin(AlwaysOnPlugin):
"""
name = 'django setup'
score = 150

def __init__(self, runner):
super(DjangoSetUpPlugin, self).__init__()
Expand Down
10 changes: 9 additions & 1 deletion runtests.sh
Expand Up @@ -4,7 +4,14 @@ export PYTHONPATH=.

django_test() {
TEST="$1"
$TEST 2>&1 | grep "Ran $2 test" > /dev/null
OUTPUT=$($TEST 2>&1)
if [ $? -gt 0 ]
then
echo FAIL: $3
$TEST
exit 1;
fi
echo $OUTPUT | grep "Ran $2 test" > /dev/null
if [ $? -gt 0 ]
then
echo FAIL: $3
Expand All @@ -31,3 +38,4 @@ django_test 'django-admin.py test --settings=testapp.settings_old_style' '2' 'dj
django_test 'testapp/runtests.py testapp.test_only_this' '1' 'via run_tests API'
django_test 'django-admin.py test --settings=testapp.settings_with_plugins testapp/plugin_t' '1' 'with plugins'
django_test 'django-admin.py test --settings=testapp.settings unittests' '4' 'unittests'
django_test 'django-admin.py test --settings=testapp.settings --with-profile' '2' 'with profile plugin'

0 comments on commit 95b9c01

Please sign in to comment.