提交 b8951baf authored 作者: Reyhane Askari's avatar Reyhane Askari

reverted assertFailure_fast change

上级 5dbdadf4
...@@ -453,8 +453,11 @@ def assertFailure_fast(f): ...@@ -453,8 +453,11 @@ def assertFailure_fast(f):
THEANO_FLAGS =cycle_detection='fast'. THEANO_FLAGS =cycle_detection='fast'.
""" """
if theano.config.cycle_detection == 'fast': if theano.config.cycle_detection == 'fast':
def new_test(*args, **kwargs): class TestAssertion(unittest.TestCase):
assert_raises(f, *args, **kwargs) def runTest(self, *args, **kwargs):
return new_test with self.assertRaises(Exception):
f(*args, **kwargs)
test_assertion = TestAssertion()
return test_assertion
else: else:
return f return f
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论