Fix tests for gpu

This commit is contained in:
Matthw Honnibal 2019-10-27 22:19:18 +01:00
parent 165e378082
commit 426b745640

View File

@ -95,12 +95,18 @@ def test_PrecomputableAffine(nO=4, nI=5, nF=3, nP=2):
def test_prefer_gpu():
assert not prefer_gpu()
try:
import cupy
except ImportError:
assert not prefer_gpu()
def test_require_gpu():
with pytest.raises(ValueError):
require_gpu()
try:
import cupy
except ImportError:
with pytest.raises(ValueError):
require_gpu()
def test_create_symlink_windows(