relocate test suite loader

This commit is contained in:
httprunner
2018-07-30 00:02:05 +08:00
parent c8e26fee21
commit 8ebb4bc638
14 changed files with 1061 additions and 916 deletions

View File

@@ -1,7 +1,6 @@
import os
from httprunner import task
from httprunner.testcase import TestcaseLoader
from httprunner import loader, task
from tests.base import ApiServerUnittest
@@ -17,7 +16,7 @@ class TestTask(ApiServerUnittest):
def test_create_suite(self):
testcase_file_path = os.path.join(os.getcwd(), 'tests/data/demo_testset_variables.yml')
testset = TestcaseLoader.load_test_file(testcase_file_path)
testset = loader.load_test_file(testcase_file_path)
suite = task.TestSuite(testset)
self.assertEqual(suite.countTestCases(), 3)
for testcase in suite: