mirror of
https://github.com/hanzo-ds/driver.git
synced 2026-10-30 20:32:40 +00:00
15 lines
332 B
Python
15 lines
332 B
Python
from functools import wraps
|
|
from unittest import SkipTest
|
|
|
|
|
|
def check_numpy(f):
|
|
@wraps(f)
|
|
def wrapper(*args, **kwargs):
|
|
try:
|
|
return f(*args, **kwargs)
|
|
except RuntimeError as e:
|
|
if 'NumPy' in str(e):
|
|
raise SkipTest('Numpy package is not installed')
|
|
|
|
return wrapper
|