提交 57b23ab3 authored 作者: abalkin's avatar abalkin

Move NoseTester instantiation back to package level.

上级 9123114a
...@@ -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): import theano.tests
try: if hasattr(theano.tests, "TheanoNoseTester"):
from theano.tests import TheanoNoseTester test = theano.tests.TheanoNoseTester().test
except ImportError: else:
def test():
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:
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论