当我设置test_suite=时,无法单独使用nosetests。“鼻采集器“在设置.py

2024-04-25 01:25:00 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我之前的问题: Best practices: how do you list required dependencies in your setup.py?

在设置.py在

test_requires = [
    'mock',
    'nose',
    'nose-progressive',
]

# test_suite uses nose so to run tests we should call  ``python setup.py test``
setup(name='lib_name',
      install_requires=install_requires,
      tests_require=test_requires,
      test_suite="nose.collector",
)

我现在可以运行python setup.py test,它将触发mock、nose和nose progressive,在运行测试之前作为egg安装在本地目录中。我没关系。在

{cd2>要测试的是个人。那已经不可能了。在

^{pr2}$

我该怎么办?由于金字塔的内部设置,全球鼻子将无法通过我的测试。在


Tags: installnamepytestsetuptestsmockdo