提交 4f9d00f5 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

wasted 45 seconds of my life appeasing the pep8 nitpickers

上级 c9eb04c2
...@@ -35,3 +35,32 @@ def test_pydotprint_cond_highlight(): ...@@ -35,3 +35,32 @@ def test_pydotprint_cond_highlight():
theano.theano_logger.removeHandler(new_handler) theano.theano_logger.removeHandler(new_handler)
assert s.getvalue() == 'pydotprint: cond_highlight is set but there is no IfElse node in the graph\n' assert s.getvalue() == 'pydotprint: cond_highlight is set but there is no IfElse node in the graph\n'
def test_min_informative_str():
""" evaluates a reference output to make sure the
min_informative_str function works as intended """
A = tensor.matrix(name = 'A')
B = tensor.matrix(name = 'B')
C = A + B
C.name = 'C'
D = tensor.matrix(name = 'D')
E = tensor.matrix(name = 'E')
F = D + E
G = C + F
mis = min_informative_str(G)
reference = """A. Elemwise{add,no_inplace}
B. C
C. Elemwise{add,no_inplace}
D. D
E. E"""
if mis != reference:
print '--'+mis+'--'
print '--'+reference+'--'
assert mis == reference
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论