refactor: split validate from context, move to validator

This commit is contained in:
debugtalk
2019-12-05 18:17:11 +08:00
parent 18aff9d0b7
commit e4755a80d5
4 changed files with 202 additions and 320 deletions

View File

@@ -277,9 +277,9 @@ class HttpRunner(object):
"""
logger.log_info("HttpRunner version: {}".format(__version__))
if validator.is_testcase_path(path_or_tests):
if loader.is_testcase_path(path_or_tests):
return self.run_path(path_or_tests, dot_env_path, mapping)
elif validator.is_testcases(path_or_tests):
elif loader.is_testcases(path_or_tests):
return self.run_tests(path_or_tests)
else:
raise exceptions.ParamsError("Invalid testcase path or testcases: {}".format(path_or_tests))