summaryrefslogtreecommitdiffstats
path: root/python/astra/tests.py
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-01-09 14:37:20 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2018-01-09 15:17:44 +0100
commitf757ae3a98b49b34bbf08ab53e5724d17000e7c9 (patch)
treebad6252ec1af8ab3c9df109c8accf0ec2afbe077 /python/astra/tests.py
parent0ad6cb01b9176e99c3e4bb5643ac6a5dd477aad6 (diff)
downloadastra-f757ae3a98b49b34bbf08ab53e5724d17000e7c9.tar.gz
astra-f757ae3a98b49b34bbf08ab53e5724d17000e7c9.tar.bz2
astra-f757ae3a98b49b34bbf08ab53e5724d17000e7c9.tar.xz
astra-f757ae3a98b49b34bbf08ab53e5724d17000e7c9.zip
Add astra.test/astra_test function
Diffstat (limited to 'python/astra/tests.py')
-rw-r--r--python/astra/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/python/astra/tests.py b/python/astra/tests.py
index 32afd36..f7c2c04 100644
--- a/python/astra/tests.py
+++ b/python/astra/tests.py
@@ -95,3 +95,13 @@ def test_CUDA():
ok3 = _basic_par3d_cuda()
if not (ok1 and ok2 and ok3):
raise RuntimeError("Test failed")
+
+def test():
+ """Perform a very basic functionality test"""
+
+ import astra
+ if astra.use_cuda():
+ test_CUDA()
+ else:
+ print("No GPU support available")
+ test_noCUDA()