From 2d50546a45dd4c92f6449a214f9654afc583ff06 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 7 Jun 2024 12:16:37 +0200 Subject: [PATCH] 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. --- client/ayon_core/tests/conftest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 client/ayon_core/tests/conftest.py diff --git a/client/ayon_core/tests/conftest.py b/client/ayon_core/tests/conftest.py new file mode 100644 index 0000000000..f66af706e1 --- /dev/null +++ b/client/ayon_core/tests/conftest.py @@ -0,0 +1,16 @@ +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