From eac0086199b8726c79230c51550bb019f9d2f5b8 Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Tue, 10 Nov 2020 12:01:57 +0000 Subject: [PATCH] tests.py now allows parts of projects to be tested without finding an implementation. --- scripts/tests.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/tests.py b/scripts/tests.py index 1813794..62286f0 100755 --- a/scripts/tests.py +++ b/scripts/tests.py @@ -160,8 +160,12 @@ def tests(tests): impl_name = name break else: - print("Can't find implementation!") - continue + if libtest: + print("Can't find implementation!") + continue + else: + type = 'Tests' # OK when testing part of a project + impl_name = None if libtest: vsplit = "AJR" + chr(ord('Z') + 1) @@ -173,7 +177,10 @@ def tests(tests): type = types[i - 1] break else: - types = [loc[1] for loc in locations] + if not types: + types = [loc[1] for loc in locations] # No need to split up the vitamin list + if not type in types: # Will happen when implementation is not found and type is set to Tests + types.append(type) for t in types: if not t in bodies: