MCPcopy
hub / github.com/pytest-dev/pytest / ImportPathMismatchError

Class ImportPathMismatchError

src/_pytest/pathlib.py:493–499  ·  src/_pytest/pathlib.py::ImportPathMismatchError

Raised on import_path() if there is a mismatch of __file__'s. This can happen when `import_path` is called multiple times with different filenames that has the same basename but reside in packages (for example "/tests1/test_foo.py" and "/tests2/test_foo.py").

Source from the content-addressed store, hash-verified

491
492
493class ImportPathMismatchError(ImportError):
494 class="st">"""Raised on import_path() if there is a mismatch of __file__&class="cm">#x27;s.
495
496 This can happen when `import_path` is called multiple times with different filenames that has
497 the same basename but reside in packages
498 (for example class="st">"/tests1/test_foo.py" and class="st">"/tests2/test_foo.py").
499 class="st">"""
500
501
502def import_path(

Callers 1

import_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected