tests.py now allows parts of projects to be tested without finding an implementation.

This commit is contained in:
Chris Palmer 2020-11-10 12:01:57 +00:00
parent 51c649cc53
commit eac0086199
1 changed files with 10 additions and 3 deletions

View File

@ -160,8 +160,12 @@ def tests(tests):
impl_name = name impl_name = name
break break
else: else:
print("Can't find implementation!") if libtest:
continue print("Can't find implementation!")
continue
else:
type = 'Tests' # OK when testing part of a project
impl_name = None
if libtest: if libtest:
vsplit = "AJR" + chr(ord('Z') + 1) vsplit = "AJR" + chr(ord('Z') + 1)
@ -173,7 +177,10 @@ def tests(tests):
type = types[i - 1] type = types[i - 1]
break break
else: 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: for t in types:
if not t in bodies: if not t in bodies: