提交 53306575 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Skip a test when pydot is not available

上级 7be6c136
...@@ -50,6 +50,10 @@ def test_pydotprint_cond_highlight(): ...@@ -50,6 +50,10 @@ def test_pydotprint_cond_highlight():
def test_pydotprint_profile(): def test_pydotprint_profile():
"""Just check that pydotprint does not crash with ProfileMode.""" """Just check that pydotprint does not crash with ProfileMode."""
# Skip test if pydot is not available.
if not theano.printing.pydot_imported:
raise SkipTest('pydot not available')
A = tensor.matrix() A = tensor.matrix()
f = theano.function([A], A + 1, mode='ProfileMode') f = theano.function([A], A + 1, mode='ProfileMode')
theano.printing.pydotprint(f, print_output_file=False) theano.printing.pydotprint(f, print_output_file=False)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论