提交 36da58c5 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed test when pydot is not available

上级 f57371d0
""" """
Tests of printing functionality Tests of printing functionality
""" """
import logging import logging
import StringIO import StringIO
from nose.plugins.skip import SkipTest
import theano import theano
import theano.tensor as tensor import theano.tensor as tensor
...@@ -17,6 +21,12 @@ def test_pydotprint_cond_highlight(): ...@@ -17,6 +21,12 @@ def test_pydotprint_cond_highlight():
I did them to help debug stuff. I did them to help debug stuff.
""" """
# Skip test if pydot is not available.
try:
import pydot
except ImportError:
raise SkipTest('pydot not available')
x = tensor.dvector() x = tensor.dvector()
f = theano.function([x], x*2) f = theano.function([x], x*2)
f([1,2,3,4]) f([1,2,3,4])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论