ターミナルからノーズを使用してカバレッジ付きのテスト結果を表示すると、実際にはカバーされているエラーと欠落した行が表示されます
$ python -m nose.core test_utils.py -s --with-coverage
言って
======================================================================
ERROR: Failure: AttributeError ('module' object has no attribute 'test_utils')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
addr.filename, addr.module)
File "/Library/Python/2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Library/Python/2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Development/python/slideShow/tests/test_utils.py", line 50, in <module>
unittest.main()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_utils'
Name Stmts Miss Cover Missing
---------------------------------------
PyQt4 0 0 100%
getopt 103 103 0% 34-210
mox 597 597 0% 17-1898
stubout 50 50 0% 17-142
utils 23 16 30% 8-10, 13-20, 23, 26-30
test_utils が見つからないのはなぜですか? 私は同じディレクトリに立っています!