Bakalarska_praca/tests/conftest.py

15 lines
403 B
Python
Raw Normal View History

2024-09-27 16:52:16 +00:00
import os
import pathlib
from glob import glob
root_path = pathlib.Path(__file__).parents[1]
# This is to prevent a bug in intellij that uses the wrong working directory
os.chdir(root_path)
def _as_module(fixture_path: str) -> str:
return fixture_path.replace("/", ".").replace("\\", ".").replace(".py", "")
pytest_plugins = [_as_module(fixture) for fixture in glob("tests/fixtures/[!_]*.py")]