From 608a8ffd1c478b84da81612a84519051fbcc1095 Mon Sep 17 00:00:00 2001 From: Shane Lee Date: Mon, 11 Mar 2024 11:21:00 -0600 Subject: [PATCH] Whitelist package tests for Windows --- tests/conftest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index e446e2329a8..8384f4a0352 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -722,11 +722,14 @@ def pytest_runtest_setup(item): entropy_generator.generate_entropy() if salt.utils.platform.is_windows(): - unit_tests_paths = ( + auto_whitelisted_paths = ( str(TESTS_DIR / "unit"), str(PYTESTS_DIR / "unit"), + str(PYTESTS_DIR / "pkg"), ) - if not str(pathlib.Path(item.fspath).resolve()).startswith(unit_tests_paths): + if not str(pathlib.Path(item.fspath).resolve()).startswith( + auto_whitelisted_paths + ): # Unit tests are whitelisted on windows by default, so, we're only # after all other tests windows_whitelisted_marker = item.get_closest_marker("windows_whitelisted")