diff options
author | Shubham Mishra <shivam828787@gmail.com> | 2020-09-23 13:17:28 +0530 |
---|---|---|
committer | Shubham Mishra <shivam828787@gmail.com> | 2020-09-23 13:22:22 +0530 |
commit | 98fd81e0c4e0f116c58bad8a8051f5e999af261e (patch) | |
tree | f0a1f235a0ae88ca53e8691b825e69b799301eef /hdv/redfish/conftest.py | |
parent | 7794bb28352a9f8140fa756c6d8ec7289aefbfc5 (diff) |
add support for pdf2.0
Change-Id: I5efa879f4707c75d347e49e34cb178d978849b94
Signed-off-by: Shubham Mishra <shivam828787@gmail.com>
Diffstat (limited to 'hdv/redfish/conftest.py')
-rw-r--r-- | hdv/redfish/conftest.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hdv/redfish/conftest.py b/hdv/redfish/conftest.py index 9bc7bcb..b1d8d5f 100644 --- a/hdv/redfish/conftest.py +++ b/hdv/redfish/conftest.py @@ -1,19 +1,20 @@ import pytest -from hdv_redfish import read_yaml +from hdv_redfish import read_yaml, parse_config def pytest_addoption(parser): parser.addoption( "--cases", action="store", default="./conf/cases.yaml", help="case yaml file" ) parser.addoption( - "--config", action="store", default="./conf/config.yaml", help="given global config.yaml file" + "--config", action="store", default="./conf/pdf2.0.json", help="given global config.yaml file" ) -@pytest.fixture(scope = 'session') -def conf_file(request): - return request.config.getoption("--config") def pytest_generate_tests(metafunc): + if "config_list" in metafunc.fixturenames: + config_file = metafunc.config.getoption("--config") + metafunc.parametrize("config_list", parse_config(config_file), indirect=True, scope='session') + if "case" in metafunc.fixturenames: cases_file = metafunc.config.getoption("--cases") metafunc.parametrize("case", read_yaml(cases_file))
\ No newline at end of file |