improve logging messages

This commit is contained in:
Daniel 2023-12-09 12:55:32 +01:00
parent a2f81aa190
commit 7519014416

View file

@ -57,7 +57,7 @@ class Runner:
"""runs the main test script and if available and sub test scripts if their running condition is met"""
# check if required dependencies have passed
if not self._dependencies_passed():
logger.warning(f"skipping run_tests() of {self.env_type}, because some dependencies have not passed")
logger.warning(f"skipping run_tests() of {self.env_type} (one or more dependencies have not passed)")
return
for test in test_list:
@ -79,16 +79,16 @@ class Runner:
# check if test aleady passed
if self._is_test_passed(identifier_string, remove_existing=True):
if test.prevent_skip:
logger.info(f"continuing , test {identifier_string} has passed but prevent_skip=True")
logger.info(f"continuing {identifier_string} (passed before but prevent_skip=True)")
else:
logger.info(f"skipping {identifier_string}, test has passed")
logger.info(f"skipping {identifier_string} (test has passed)")
return
if test.condition:
condition_result = self._run_condition(test.condition)
if not condition_result:
# test condition is defined but not met
logger.info(f"skipping {identifier_string}, test condition is not met")
logger.info(f"skipping {identifier_string} (test condition is not met)")
return
# test condition is undefined or not met
@ -126,7 +126,7 @@ class Runner:
return already_passed
def _call_pytest(self, full_test_path: Path) -> int:
"""runs pytest programmatically on a specific file
"""runs pytest programmatically with a specific file
all tests in the file [full_test_path] will be run along with command line arguments"""