Skip to content

Commit

Permalink
Update conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sreekarreddydfci authored Feb 15, 2024
1 parent 1957866 commit 61491ba
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

from pathml.core import Tile, VectraSlide, types

def pytest_configure(config):
if sys.platform == 'win64':
# Fetch the OpenSlide path from environment variable
print('Setting path')
openslide_path = os.getenv('OPENSLIDE_PATH')
if openslide_path:
os.add_dll_directory(openslide_path)
else:
raise RuntimeError("OPENSLIDE_PATH environment variable is not set.")

def pytest_sessionfinish(session, exitstatus):
"""
Expand Down

0 comments on commit 61491ba

Please sign in to comment.