aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zlib/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zlib/run_tests.py')
-rw-r--r--tests/zlib/run_tests.py30
1 files changed, 6 insertions, 24 deletions
diff --git a/tests/zlib/run_tests.py b/tests/zlib/run_tests.py
index bf62390..e9094c2 100644
--- a/tests/zlib/run_tests.py
+++ b/tests/zlib/run_tests.py
@@ -1,9 +1,5 @@
import pytest
-
-import os
-
import tests.zlib.parser as parser
-
from plugins.agl_test_ptest_base import PTESTBase
class ZLIBBase(PTESTBase):
@@ -15,32 +11,18 @@ class ZLIBBase(PTESTBase):
self.case_info_list = parser.log_parse(log_file)
self.init_case_status()
+instance = ZLIBBase()
+instance.run_ptest()
+
@pytest.fixture(scope='module')
def testbase():
- #init instance for test
- instance = ZLIBBase()
- #run test scripts
- #the "test_name" should be the name of test set in ptest
- instance.run_test_fun()
- #parser log
- instance.log_process()
yield instance
#package log files and make report file
instance.log_report()
-def precheck():
- instance = ZLIBBase()
- return instance.precheck()
-skip_msg = "The current environment does not match the test requirements."
-pytestmark = pytest.mark.skipif(precheck() == False, reason = skip_msg)
-
-def setup_module(testbase: ZLIBBase):
- print("setup function start")
-
-
-def test_zlib(testbase: ZLIBBase):
- name = "zlib"
- testbase.run_case(name)
+@pytest.mark.parametrize('case_name', instance.case_info_list.keys())
+def test_zlib(testbase: ZLIBBase, case_name):
+ testbase.run_case(case_name)
if __name__ == '__main__':
pytest.main("-s run_tests")