From f9e9b28dd425ba811f20215546fe984b5f2cfcd1 Mon Sep 17 00:00:00 2001 From: msftcangoblowme Date: Thu, 29 Aug 2024 10:04:02 +0000 Subject: [PATCH] add a inventory online check skip list - test(test_api_good_nonlocal): provide explicit reasons to skip test --- CHANGELOG.md | 2 ++ tests/test_api_good_nonlocal.py | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e60a9e..15ff652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ changes. #### Tests + * in tests/test_api_good_nonlocal.py provide explicit reasons test skip + * in test_api_inventory_many_url_imports, sequence of inventory file names to skip * add resources objects_attrs_plus_one_entry.{txt|inv} * compare existing resources. Rather modify then .txt --> .inv * add fixtures res_cmp_plus_one_line is_linux gitconfig gitattributes diff --git a/tests/test_api_good_nonlocal.py b/tests/test_api_good_nonlocal.py index 85bfb1d..c4f61da 100644 --- a/tests/test_api_good_nonlocal.py +++ b/tests/test_api_good_nonlocal.py @@ -84,8 +84,18 @@ def test_api_inventory_many_url_imports( scr_fpath = scratch_path / fname # Drop most unless testall - if not pytestconfig.getoption("--testall") and fname != "objects_attrs.inv": - pytest.skip("'--testall' not specified") + skips = ( + "objects_attrs.inv", + "objects_attrs_plus_one_entry.inv", + ) + is_not_testall = not pytestconfig.getoption("--testall") + if is_not_testall: + reason = "'--testall' not specified" + pytest.skip(reason) + is_skip = fname in skips + if is_skip: + reason = f"skip online checks for theis inventory {fname}" + pytest.skip(reason) # Construct inventories for comparison mch = misc_info.p_inv.match(fname)