Search code examples
djangounit-testingnosenosetests

django_nose unit tests fail (no such option)


I have a new project and can't get django_nose set up correctly. I have never had this problem before. So, makes me think that it's a configuration issue. But, I can't spot it.

I'm using virtualenv and have both nose and django-nose installed. Here is my requirements.txt

Django==1.3.1
distribute==0.6.24
django-nose==1.0
nose==1.1.2
psycopg2==2.4.5
wsgiref==0.1.2

settings.py

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_nose',
    'main',
)

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

NOSE_ARGS = [
    '--with-spec', '--spec-color',
    # Packages to test
    'main',
]

With my virtualenv activated, when I run:

python manage.py test

I get the following:

nosetests --verbosity 1 --with-spec --spec-color main
Usage: manage.py [options]

manage.py: error: no such option: --with-spec

Has anybody had this problem? Can someone see what I'm doing wrong?


Solution

  • I figured it out. My fault (as usual). Just for future reference... those are actually not nose arguments and probably shouldn't be in there. They are args for pinocchio.

    pinocchio