from typing import Union
from pathlib import Path


def resource(*nodes: Union[Path, str]) -> Path:
    """Gets a path of a test resource file under resources/."""
    return Path(Path(__file__).parent, "resources", *nodes)