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?
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
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) If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With