Reputation: 198328
I followed the application to run the tests of pylons project:
http://pylonshq.com/docs/en/0.9.7/i18n/#testing-the-application
But when I run:
nosetests --with-pylons test.ini
It reports an error:
E:\pylons\helloworld>nosetests --with-pylons test.ini
Usage: nosetests-script.py [options]
nosetests-script.py: error: no such option: --with-pylons
Why nosetests doesn't know the --with-pylons
, how to fix it?
Upvotes: 5
Views: 3984
Reputation: 1526
If you've installed the latest version of pylons using pip, version 1.0.1rc1 is installed. Nose is not able to find the pylons-plugin.
To fix this downgrade to pylons 1.0.
pip uninstall pylons
pip install pylons==1.0
I had the same problem and found the solution here
Upvotes: 0
Reputation: 1564
If you are using Pylons 1.0.1, the nose plugin is not registered by Pylons itself any more.
A workaround is to add this to the entry_points
section of your own project's setup.py
:
[nose.plugins]
pylons = pylons.test:PylonsPlugin
Upvotes: 8
Reputation: 45182
This error happens in cases where nose cannot find installed pylons.
This can happen if nose is installed system-wide (for example, via apt-get install python-nose
), but Pylons is installed in virtual environment. In that case you can either:
easy_install -U nose
when virtual environment is activated) Upvotes: 3
Reputation: 18050
I never used --with-pylons
. When I am in the directory of the project, nosetests
does the job without any parameters.
I'm on Linux, with the proper virtualenv activated. Maybe it's different on Windows.
Upvotes: -2