项目树:
.
|-- bar.py
`-- test
|-- __init__.py
`-- test_bar.py
棒.py:
^{pr2}$测试/测试_棒.py:
import bar
def test_bar_true():
assert bar.dumb_true()
我可以从项目或其测试目录中运行nosetests
。但是,如果我在项目文件夹中添加一个空的__init__.py
,我就不能再从测试目录中运行nosetests
,这对我来说没有任何意义。在
.
|-- bar.py
|-- __init__.py <-- new, empty file, ruining everything
`-- test
|-- __init__.py
`-- test_bar.py
有人能给我解释一下这是怎么回事吗?在
我已经阅读了大量关于这个主题的文章-通过nose文档/手册页和互联网上的所有内容;但是对于我来说,这一切是如何解决的,我觉得非常困惑!在
你的问题似乎得到了回答here。在
相关问题 更多 >
编程相关推荐