提交 382b44f7 authored 作者: Frederic's avatar Frederic

make theano-nose work with older nosetests.

上级 efca9be8
......@@ -114,7 +114,22 @@ def main():
if '--disabdocstring' in sys.argv:
addplugins.append(DisabDocString())
return nose.main(addplugins=addplugins)
try:
if addplugins:
ret = nose.main(addplugins=addplugins)
else:
ret = nose.main()
return ret
except TypeError, e:
if "got an unexpected keyword argument 'addplugins'" in e.message:
# This mean nose is too old and don't support plugins
_logger.warn(
'KnownFailure plugin from NumPy can\'t'
' be used as nosetests is too old. '
'Use --without-knownfailure to disable this warning.')
nose.main()
else:
raise
def help():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论