2
我有一個簡單function with a doctest,它在與獅身人面像的make doctest
運行,使我有以下錯誤:爲什麼在使用Sphinx的`make doctest`運行時,doctests會引發NameError?
File "scheemey.rst", line ?, in default
Failed example:
verify_balanced('asdf (foo [bar] [[baz], {},()]')
Exception raised:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest default[0]>", line 1, in <module>
verify_balanced('asdf (foo [bar] [[baz], {},()]')
NameError: name 'verify_balanced' is not defined
可能是什麼造成的?