mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
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.
16 lines
343 B
Python
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
|