我已经为 Django 1.3.1 安装了所有东西: django-nose
, django-nose-selenium
, 并设置了测试运行器:
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
首先,似乎通过运行 command: $./manage.py test
,Django 的内部测试开始运行而不是 Nose。
其次,通过运行$nosetests
我得到这个:
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium = noseselenium.plugins:SeleniumPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin djangoliveserver = noseselenium.plugins:DjangoLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin cherrypyliveserver = noseselenium.plugins:CherryPyLiveServerPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
RuntimeWarning)
/usr/local/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin selenium_fixtures = noseselenium.plugins:SeleniumFixturesPlugin: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
任何想法 ??