From ab3e4d4e4052c2e153d7dd75ff1ef488d7e047ae Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 9 Jan 2026 09:32:56 -0500 Subject: [PATCH] qa/workunits/smb: make the smb_cfg fixture module scoped This means the file will only be read when pytest changes modules. This also allows this fixture to be used with other fixtures at the module or scope "higher" than the function scope. See: https://docs.pytest.org/en/stable/how-to/fixtures.html#fixture-scopes Signed-off-by: John Mulligan --- qa/workunits/smb/tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/workunits/smb/tests/conftest.py b/qa/workunits/smb/tests/conftest.py index dcc8f9e99c7e..6863645cece6 100644 --- a/qa/workunits/smb/tests/conftest.py +++ b/qa/workunits/smb/tests/conftest.py @@ -16,7 +16,7 @@ def read_smb_test_meta(conf_file=None): return SMBTestConf(json_data) -@pytest.fixture +@pytest.fixture(scope='module') def smb_cfg(): conf = read_smb_test_meta() if not conf: -- 2.47.3