def start_test_if_required(test_obj=None): if test_obj is None: test_obj = TestResult() if not test_obj.is_test_started(): logger.warning('Test is not created and/or started.') test_obj.start_test()
def start_test(): logger.info('Start test') test_result = TestResult() test_result.start_test() logger.debug('Start test completed')