"""Simple assertions which print the expected and received values on failure."""
+import os.path
import typing as T
+from pathlib import Path
from .log import log
if content0 != content1:
raise ValueError(f"expected files {path0} and {path1} to match")
+
+
+def file_exists(path: T.Union[str, Path]) -> None:
+ """Check that file or directory exists."""
+ if not os.path.exists(path):
+ raise ValueError("expected path '{path}' to exist")