From 37349f3274a4f837bbb3ba227a515edbd43d8cd4 Mon Sep 17 00:00:00 2001 From: Yoel Cortes-Pena Date: Fri, 19 Apr 2024 20:35:49 -0500 Subject: [PATCH] fix preference testing --- conftest.py | 3 +++ thermosteam/_preferences.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index 81cb4c82..cff669db 100644 --- a/conftest.py +++ b/conftest.py @@ -13,4 +13,7 @@ def pytest_addoption(parser): def pytest_configure(config): os.environ["NUMBA_DISABLE_JIT"] = config.getoption("--disable-numba") + os.environ["DISABLE_PREFERENCES"] = "1" + os.environ["FILTER_WARNINGS"] = "1" + os.environ["PY_IGNORE_IMPORTMISMATCH"] = "1" \ No newline at end of file diff --git a/thermosteam/_preferences.py b/thermosteam/_preferences.py index 32c3b308..7218ba85 100644 --- a/thermosteam/_preferences.py +++ b/thermosteam/_preferences.py @@ -307,6 +307,6 @@ def __exit__(self, type, exception, traceback): if os.environ.get("FILTER_WARNINGS"): from warnings import filterwarnings; filterwarnings('ignore') -if not os.environ.get("DISABLE_PREFERENCES") == "1": - try: preferences.autoload() - except: pass +# if not os.environ.get("DISABLE_PREFERENCES") == "1": +# try: preferences.autoload() +# except: pass