From 7e709b11ddc8aaba5d9fad5e91aafa9f1c15d601 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Mon, 8 May 2023 11:34:33 +0100 Subject: [PATCH] Revert "Allow running unit/functional tests against the salt checkout for now" This reverts commit 7382aa187e7cb19ba0e63d53af54872e05836a6a. --- tests/conftest.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index c076ca2b471..1d7c8ba796a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -258,18 +258,18 @@ def pytest_configure(config): called after command line options have been parsed and all plugins and initial conftest files been loaded. """ - # try: - # assert config._onedir_check_complete - # return - # except AttributeError: - # if os.environ.get("ONEDIR_TESTRUN", "0") == "1": - # if pathlib.Path(salt.__file__).parent == CODE_DIR / "salt": - # raise pytest.UsageError( - # "Apparently running the test suite against the onedir build " - # "of salt, however, the imported salt package is pointing to " - # "the respository checkout instead of the onedir package." - # ) - # config._onedir_check_complete = True + try: + assert config._onedir_check_complete + return + except AttributeError: + if os.environ.get("ONEDIR_TESTRUN", "0") == "1": + if pathlib.Path(salt.__file__).parent == CODE_DIR / "salt": + raise pytest.UsageError( + "Apparently running the test suite against the onedir build " + "of salt, however, the imported salt package is pointing to " + "the respository checkout instead of the onedir package." + ) + config._onedir_check_complete = True for dirname in CODE_DIR.iterdir(): if not dirname.is_dir():