提交 901583ea authored 作者: abalkin's avatar abalkin

NoseTester must be initialized at the package level.

上级 bab891c3
...@@ -168,14 +168,13 @@ def get_scalar_constant_value(v): ...@@ -168,14 +168,13 @@ def get_scalar_constant_value(v):
return tensor.get_scalar_constant_value(v) return tensor.get_scalar_constant_value(v)
def test(**kwds): try:
try: from theano.tests import TheanoNoseTester
from theano.tests import TheanoNoseTester except ImportError:
except ImportError: raise ImportError("The nose module is not installed."
raise ImportError("The nose module is not installed." " It is needed for Theano tests.")
" It is needed for Theano tests.") else:
else: test = TheanoNoseTester().test
return TheanoNoseTester().test(**kwds)
# This cannot be done in tensor/__init__.py due to a circular dependency -- randomstreams # This cannot be done in tensor/__init__.py due to a circular dependency -- randomstreams
# depends on raw_random which depends on tensor. As a work-around, we import RandomStreams # depends on raw_random which depends on tensor. As a work-around, we import RandomStreams
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论