import pathlib
from typing import Iterable


def is_covered(path: pathlib.Path, sources: Iterable[pathlib.Path]) -> bool:
    """
    Checks if `path` is contained in any of the subdirectories in sources.
    See the test cases for details.
    """
    path = path.resolve()
    abs_path = [source.resolve() for source in sources]
    return any(c in abs_path for c in list(path.parents) + [path])