From f757ae3a98b49b34bbf08ab53e5724d17000e7c9 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 9 Jan 2018 14:37:20 +0100 Subject: Add astra.test/astra_test function --- python/astra/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'python/astra/tests.py') 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() -- cgit v1.2.3