提交 686e85fc authored 作者: Frederic Bastien's avatar Frederic Bastien

Skip a test if cuda isn't available.

上级 149d008d
import os.path
from nose.plugins.skip import SkipTest
from nose.tools import assert_raises
import numpy
......@@ -8,8 +9,10 @@ from theano.compat import PY3
from theano.misc.pkl_utils import CompatUnpickler
from theano.sandbox.cuda import cuda_available
if cuda_available:
from theano.sandbox.cuda import CudaNdarray
if not cuda_available:
raise SkipTest('Optional package cuda disabled')
from theano.sandbox.cuda import CudaNdarray
# testfile created on cuda enabled machine using
# >>> with open('CudaNdarray.pkl', 'wb') as fp:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论