我按照应用程序运行了pylons项目的测试:
http://pylonshq.com/docs/en/0.9.7/i18n/#testing-the-application
但是当我跑步时:
nosetests --with-pylons test.ini
Run Code Online (Sandbox Code Playgroud)
它报告错误:
E:\pylons\helloworld>nosetests --with-pylons test.ini
Usage: nosetests-script.py [options]
nosetests-script.py: error: no such option: --with-pylons
Run Code Online (Sandbox Code Playgroud)
为什么nosetests不知道--with-pylons,怎么解决?
如果你正在使用Pylons 1.0.1,那么鼻子插件就不会被Pylons本身注册了.
解决方法是将其添加到entry_points您自己项目的部分setup.py:
[nose.plugins]
pylons = pylons.test:PylonsPlugin
Run Code Online (Sandbox Code Playgroud)
Ant*_*air -2
我从来没有用过--with-pylons。当我位于项目目录中时,nosetests无需任何参数即可完成工作。
我在 Linux 上,激活了正确的 virtualenv。也许 Windows 上的情况有所不同。
| 归档时间: |
|
| 查看次数: |
3257 次 |
| 最近记录: |