Compare a CPython path with a local path (file or directory).
(cpython_path: pathlib.Path, local_path: pathlib.Path)
| 231 | |
| 232 | |
| 233 | def compare_paths(cpython_path: pathlib.Path, local_path: pathlib.Path) -> bool: |
| 234 | """Compare a CPython path with a local path (file or directory).""" |
| 235 | if not local_path.exists(): |
| 236 | return False |
| 237 | |
| 238 | if cpython_path.is_file(): |
| 239 | return filecmp.cmp(cpython_path, local_path, shallow=False) |
| 240 | |
| 241 | dcmp = filecmp.dircmp(cpython_path, local_path) |
| 242 | return _dircmp_is_same(dcmp) |
| 243 | |
| 244 | |
| 245 | def compare_file_contents( |
no test coverage detected