我试图py.test
在我的包上运行,但它试图setup.py
从项目根目录中解析,即使我试图排除它。
我需要从 *.py 文件中收集测试,因为测试类包含在模块中。
# setup.cfg
[pytest]
norecursedirs = .svn _build tmp* lib/third lib *.egg bin distutils setup.py
python_files = *.py
仍然当我运行py.test
它会给我ERROR collecting setup.py
我已经排除的。
/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py:140: in setup
> raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
E SystemExit: usage: py.test [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
E or: py.test --help [cmd1 cmd2 ...]
E or: py.test --help-commands
E or: py.test cmd --help
E
E error: no commands supplied