aboutsummaryrefslogtreecommitdiffstats
path: root/tests/LTP/math/run_tests.py
blob: e288534c55d9cdff53cfe94e8ec3a2ba40826cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import pytest

from tests.LTP.agl_test_ltp_base import LTPBase

class MathBase(LTPBase):
    def __init__(self):
        super().__init__(test_name="math")

instance = MathBase()
skip_msg = "The current environment does not match the test requirements."
pytestmark = pytest.mark.skipif(instance.precheck() == False, reason = skip_msg)
test_case_list = instance.get_test_case_list()

@pytest.fixture(scope='module')
def testbase():
    yield instance
    #package log files and make report file
    instance.log_report()

@pytest.mark.parametrize('case_name', test_case_list)
def test_ltp_math(testbase: MathBase, case_name):
    testbase.run_ltp_test(case_name)
    testbase.run_case(case_name)

if __name__ == '__main__':
    pytest.main("-s run_tests")