diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-01-09 14:37:20 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-01-09 15:17:44 +0100 |
commit | f757ae3a98b49b34bbf08ab53e5724d17000e7c9 (patch) | |
tree | bad6252ec1af8ab3c9df109c8accf0ec2afbe077 /python/astra/tests.py | |
parent | 0ad6cb01b9176e99c3e4bb5643ac6a5dd477aad6 (diff) | |
download | astra-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.py | 10 |
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() |