Permalink
Browse files

nosetests, travis django versions updated

  • Loading branch information...
1 parent 55d4d59 commit a8ddd8889e9d14ce6c353191f3bc6dacbe3ec27b @whit whit committed Apr 29, 2013
Showing with 19 additions and 4 deletions.
  1. +2 −3 .travis.yml
  2. +11 −0 setup.cfg
  3. +1 −1 setup.py
  4. +5 −0 test_ella/__init__.py
View
@@ -3,11 +3,10 @@ python:
- "2.6"
- "2.7"
install:
- - "if [[ $DJANGO == '1.5.x' ]]; then pip install https://github.com/django/django/archive/stable/1.5.x.zip#egg=Django; else pip install Django==$DJANGO --use-mirrors; fi"
@HonzaKral
HonzaKral Apr 1, 2014 Member

removing this lines negates all the DJANGO=XXX settings which go unused!

@whit
whit Apr 1, 2014 Member

Test runs for all specified versions (https://travis-ci.org/ella/ella). I have removed this line few months after 1.5.x was officially released. I think this is needed just for testing on unreleased versions, right? Put it back if you plan run tests for 1.7.

@HonzaKral
HonzaKral Apr 2, 2014 Member

no, it actually doesn't run on different versions without this line, it just runs 3 times with the latest django from PYPI

@whit
whit Apr 2, 2014 Member

You are right, of course. Fixed

- pip install -r dev_requirements.txt --use-mirrors
- python setup.py develop
env:
- DJANGO="1.3.3"
- DJANGO="1.4.1"
- - DJANGO="1.5.x"
-script: python setup.py test
+ - DJANGO="1.5.1"
+script: python setup.py nosetests
View
@@ -0,0 +1,11 @@
+[nosetests]
+verbosity=0
+with-coverage=1
+cover-erase=1
+cover-package=ella
+;with-xunit=1
+detailed-errors=1
+debug=ella
+;pdb=1
+;pdb-failures=1
+where=./test_ella/
View
@@ -50,6 +50,6 @@
],
install_requires=install_requires,
- test_suite='test_ella.run_tests.run_all',
+ test_suite='nose.collector',
tests_require=tests_require,
)
@@ -5,9 +5,13 @@
If You're looking for example project, take a look into example_project directory.
"""
+import os
test_runner = None
old_config = None
+os.environ['DJANGO_SETTINGS_MODULE'] = 'test_ella.settings'
+
+
def setup():
global test_runner
global old_config
@@ -18,6 +22,7 @@ def setup():
old_config = test_runner.setup_databases()
call_modules(('register', ))
+
def teardown():
from shutil import rmtree
from django.conf import settings

2 comments on commit a8ddd88

@HonzaKral
Member

What is the reason for this commit?

Why is it ignoring all the work in run_tests.py while still keeping the file around?

@whit
Member
whit commented on a8ddd88 Apr 1, 2014

Nothing important, just simpler configuration in setup.cfg and (as I hope) right way to do setuptools-nose integration.

Please sign in to comment.