lfcli_base.py: added success method that does not exit to allow for report generation from script after success

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-04-07 05:36:18 -06:00
parent 9e675065d1
commit 4f7154b881

View File

@@ -430,6 +430,11 @@ class LFCliBase:
print(message %(num_passing,num_total))
sys.exit(0)
def success(self,message="%d out of %d tests passed successfully."):
num_total=len(self.get_result_list())
num_passing=len(self.get_passed_result_list())
print(message %(num_passing,num_total))
# use this inside the class to log a pass result and print if wished.
def _pass(self, message, print_=False):
self.test_results.append(self.pass_pref + message)