1

我已经为 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.

任何想法 ??

4

1 回答 1

0

您是否将“django_nose”添加到 INSTALLED_APPS?

于 2012-09-21T14:01:19.397 回答