refactor context:

1, testset and testcase are in different context level;
2, testset context will be initialized when a file is loaded, and testcase level context initializes when each testcase starts;
3, testcase context should inherit from testset context configs, and the testcase context has high priority.
This commit is contained in:
debugtalk
2017-07-01 21:40:46 +08:00
parent da445df78b
commit dc7a4b69bc
6 changed files with 164 additions and 117 deletions

View File

@@ -26,7 +26,7 @@ def create_suite(testset):
test_runner = runner.TestRunner()
config_dict = testset.get("config", {})
test_runner.update_context(config_dict, level="testset")
test_runner.init_context(config_dict, level="testset")
testcases = testset.get("testcases", [])
for testcase in testcases: