7

今天,我在带有鼻子的 Ubuntu 9.10 上使用 Python 2.6 运行了一堆文档测试:

nosetests --with-doctest
Ran 0 tests in 0.001s

OK

怎么回事?我在那些文件中进行了测试,为什么那不起作用?

我将权限更改为 644:

sudo chmod 644 * -R
nosetests --with-doctest
Ran 11 test in 0.004s

FAILED (errors=1)

将其更改回 777:

sudo chmod 777 * -R
nosetests --with-doctest
Ran 0 tests in 0.001s

OK

这是为什么?使用 644,我什至无法编辑我的文件!

4

1 回答 1

11

试试--exe国旗:

$ nosetests --help

...    

--exe               Look for tests in python modules that are executable.
                    Normal behavior is to exclude executable modules,
                    since they may not be import-safe [NOSE_INCLUDE_EXE]
于 2010-03-04T11:08:42.217 回答