mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-15 10:42:34 +03:00
Fix tests for gpu
This commit is contained in:
parent
165e378082
commit
426b745640
|
@ -95,10 +95,16 @@ def test_PrecomputableAffine(nO=4, nI=5, nF=3, nP=2):
|
||||||
|
|
||||||
|
|
||||||
def test_prefer_gpu():
|
def test_prefer_gpu():
|
||||||
|
try:
|
||||||
|
import cupy
|
||||||
|
except ImportError:
|
||||||
assert not prefer_gpu()
|
assert not prefer_gpu()
|
||||||
|
|
||||||
|
|
||||||
def test_require_gpu():
|
def test_require_gpu():
|
||||||
|
try:
|
||||||
|
import cupy
|
||||||
|
except ImportError:
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
require_gpu()
|
require_gpu()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user