ayon-core/client/ayon_core/tests/conftest.py
Jakub Jezek 2d50546a45
Add test fixture for generating resource paths
A new test fixture was added to generate resource paths based on input arguments. This fixture constructs a path using the parent directory of the current file and specified arguments.
2024-06-07 12:16:37 +02:00

16 lines
343 B
Python

import pytest
from pathlib import Path
collect_ignore = ["vendor", "resources"]
RESOURCES_PATH = 'resources'
@pytest.fixture
def resources_path_factory():
def factory(*args):
dirpath = Path(__file__).parent / RESOURCES_PATH
for arg in args:
dirpath = dirpath / arg
return dirpath
return factory