Ejemplo n.º 1
0
def get_dir_manifest(path, run_info):
    """Get the ExpectedManifest for a particular test path, or None if there is no
    metadata stored for that test path.

    :param path: Full path to the ini file
    :param run_info: Dictionary of properties of the test run for which the expectation
                     values should be computed.
    """
    try:
        with open(path) as f:
            return static.compile(
                f, run_info, data_cls_getter=lambda x, y: DirectoryManifest)
    except IOError:
        return None
Ejemplo n.º 2
0
def get_dir_manifest(path, run_info):
    """Get the ExpectedManifest for a particular test path, or None if there is no
    metadata stored for that test path.

    :param path: Full path to the ini file
    :param run_info: Dictionary of properties of the test run for which the expectation
                     values should be computed.
    """
    try:
        with open(path) as f:
            return static.compile(f,
                                  run_info,
                                  data_cls_getter=lambda x,y: DirectoryManifest)
    except IOError:
        return None
Ejemplo n.º 3
0
def get_manifest(metadata_root, test_path, run_info):
    """Get the ExpectedManifest for a particular test path, or None if there is no
    metadata stored for that test path.

    :param metadata_root: Absolute path to the root of the metadata directory
    :param test_path: Path to the test(s) relative to the test root
    :param run_info: Dictionary of properties of the test run for which the expectation
                     values should be computed.
    """
    manifest_path = expected.expected_path(metadata_root, test_path)
    try:
        with open(manifest_path) as f:
            return static.compile(f, run_info, data_cls_getter=data_cls_getter, test_path=test_path)
    except IOError:
        return None
Ejemplo n.º 4
0
def get_dir_manifest(metadata_root, path, run_info):
    """Get the ExpectedManifest for a particular test path, or None if there is no
    metadata stored for that test path.

    :param metadata_root: Absolute path to the root of the metadata directory
    :param path: Path to the ini file relative to the metadata root
    :param run_info: Dictionary of properties of the test run for which the expectation
                     values should be computed.
    """
    full_path = os.path.join(metadata_root, path)
    try:
        with open(full_path) as f:
            return static.compile(
                f, run_info, data_cls_getter=lambda x, y: DirectoryManifest)
    except IOError:
        return None
Ejemplo n.º 5
0
def get_dir_manifest(metadata_root, path, run_info):
    """Get the ExpectedManifest for a particular test path, or None if there is no
    metadata stored for that test path.

    :param metadata_root: Absolute path to the root of the metadata directory
    :param path: Path to the ini file relative to the metadata root
    :param run_info: Dictionary of properties of the test run for which the expectation
                     values should be computed.
    """
    full_path = os.path.join(metadata_root, path)
    try:
        with open(full_path) as f:
            return static.compile(f,
                                  run_info,
                                  data_cls_getter=lambda x,y: DirectoryManifest)
    except IOError:
        return None
Ejemplo n.º 6
0
def get_manifest(metadata_root, test_path, run_info):
    """Get the ExpectedManifest for a particular test path, or None if there is no
    metadata stored for that test path.

    :param metadata_root: Absolute path to the root of the metadata directory
    :param test_path: Path to the test(s) relative to the test root
    :param run_info: Dictionary of properties of the test run for which the expectation
                     values should be computed.
    """
    manifest_path = expected.expected_path(metadata_root, test_path)
    try:
        with open(manifest_path) as f:
            return static.compile(f,
                                  run_info,
                                  data_cls_getter=data_cls_getter,
                                  test_path=test_path)
    except IOError:
        return None