更新:如果我改变
from scitools.std import *
例如
from scitools.std import sqrt, zeros
一切正常..
我正在尝试运行nosetests -s myfile.py,但我一直收到此错误:
======================================================================
ERROR: Test if modulename can be imported, and if not, write
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/usr/local/lib/python2.7/dist-packages/nose/util.py", line 613, in newfunc
return func(*arg, **kw)
TypeError: test_if_module_exists() takes at least 1 argument (0 given)
程序:
from scitools.std import *
import nose.tools as nt
def test_test():
diff = 1E-6
nt.assert_almost_equal(diff, 0, delta=1E-5)
def main():
print __name__
if __name__ == "__main__":
main()
我正在运行鼻子 1.3.0。在网上找了很多解决办法,没找到!
多谢你们!