Skip to content

Commit

Permalink
fix preference testing
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Apr 20, 2024
1 parent 216f081 commit 37349f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

6 changes: 3 additions & 3 deletions thermosteam/_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 37349f3

Please sign in to comment.