pytest_wdl/fixtures.py
def workflow_data_descriptors(
    request: FixtureRequest,
    project_root: Union[str, Path],
    workflow_data_descriptor_file: Union[str, Path],
) -> dict:
    """
    Fixture that provides a mapping of test data names to values. If
    workflow_data_descriptor_file is relative, it is searched first relative to the
    current test context directory and then relative to the project root.

    Args:
        workflow_data_descriptor_file: Path to the data descriptor JSON file.

    Returns:
        A dict with keys as test data names and each value either a
        primitive, a map describing a data file, or a DataFile object.
    """
    search_paths = [Path(request.fspath.dirpath()), project_root]
    workflow_data_descriptor_path = ensure_path(
        workflow_data_descriptor_file,
        search_paths=search_paths,
        is_file=True,
        exists=True,
    )
    with open(workflow_data_descriptor_path, "rt") as inp:
        if yaml and workflow_data_descriptor_path.suffix == ".yaml":
            yaml_loader = yaml.YAML(typ="safe")
            yaml_loader.default_flow_style = False
            return yaml_loader.load(inp)
        else:
            return json.load(inp)

    Fixture that provides a mapping of test data names to values. If
    workflow_data_descriptor_file is relative, it is searched first relative to the
    current test context directory and then relative to the project root.

    Args:
        workflow_data_descriptor_file: Path to the data descriptor JSON file.

    Returns:
        A dict with keys as test data names and each value either a
        primitive, a map describing a data file, or a DataFile object.
    
Fixture that provides a mapping of test data names to values. If
workflow_data_descriptor_file is relative, it is searched first relative to the
current test context directory and then relative to the project root.
Fixture that provides a mapping of test data names to values . If workflow_data_descriptor_file is relative it is searched first relative to the current test context directory and then relative to the project root .
def workflow_data_descriptors(
    request: FixtureRequest,
    project_root: Union[str, Path],
    workflow_data_descriptor_file: Union[str, Path],
) -> dict:
    search_paths = [Path(request.fspath.dirpath()), project_root]
    workflow_data_descriptor_path = ensure_path(
        workflow_data_descriptor_file,
        search_paths=search_paths,
        is_file=True,
        exists=True,
    )
    with open(workflow_data_descriptor_path, "rt") as inp:
        if yaml and workflow_data_descriptor_path.suffix == ".yaml":
            yaml_loader = yaml.YAML(typ="safe")
            yaml_loader.default_flow_style = False
            return yaml_loader.load(inp)
        else:
            return json.load(inp)
def workflow_data_descriptors ( request : FixtureRequest , project_root : Union [ str , Path ] , workflow_data_descriptor_file : Union [ str , Path ] , ) -> dict : search_paths = [ Path ( request . fspath . dirpath ( ) ) , project_root ] workflow_data_descriptor_path = ensure_path ( workflow_data_descriptor_file , search_paths = search_paths , is_file = True , exists = True , ) with open ( workflow_data_descriptor_path , "rt" ) as inp : if yaml and workflow_data_descriptor_path . suffix == ".yaml" : yaml_loader = yaml . YAML ( typ = "safe" ) yaml_loader . default_flow_style = False return yaml_loader . load ( inp ) else : return json . load ( inp )
Fixture that provides a mapping of test data names to values.
Fixture that provides a mapping of test data names to values .
"""
    Fixture that provides a mapping of test data names to values. If
    workflow_data_descriptor_file is relative, it is searched first relative to the
    current test context directory and then relative to the project root.

    Args:
        workflow_data_descriptor_file: Path to the data descriptor JSON file.

    Returns:
        A dict with keys as test data names and each value either a
        primitive, a map describing a data file, or a DataFile object.
    """
A dict with keys as test data names and each value either a
primitive, a map describing a data file, or a DataFile object.
A dict with keys as test data names and each value either a primitive a map describing a data file or a DataFile object .
request
FixtureRequest
project_root
Union[str, Path]
workflow_data_descriptor_file
Union[str, Path]
Path to the data descriptor JSON file.
Path to the data descriptor JSON file .