diff options
author | David Robillard <d@drobilla.net> | 2019-10-23 00:00:17 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-10-23 00:00:17 +0200 |
commit | bf9fc44b3ba43065de6eb7098a4a576425490197 (patch) | |
tree | 97226d02534ef209d58e9864341fd99391b6b15f /bindings/test | |
parent | ce097012c2ea8ff09db48621af90eeca09579f16 (diff) | |
download | lilv-bf9fc44b3ba43065de6eb7098a4a576425490197.tar.gz lilv-bf9fc44b3ba43065de6eb7098a4a576425490197.tar.bz2 lilv-bf9fc44b3ba43065de6eb7098a4a576425490197.zip |
Skip instance test if numpy is missing
Diffstat (limited to 'bindings/test')
-rw-r--r-- | bindings/test/python/test_api.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bindings/test/python/test_api.py b/bindings/test/python/test_api.py index 23345e8..0b06292 100644 --- a/bindings/test/python/test_api.py +++ b/bindings/test/python/test_api.py @@ -366,7 +366,11 @@ class InstanceTests(unittest.TestCase): ) def testRun(self): - import numpy + try: + import numpy + except ImportError: + sys.stderr.write("warning: Missing numpy, not testing instance\n") + return n_samples = 100 buf = numpy.zeros(n_samples) |