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

Class ImportPathMismatchError

src/_pytest/pathlib.py:493–499  ·  view source on GitHub ↗

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 """Raised on import_path() if there is a mismatch of __file__'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 "/tests1/test_foo.py" and "/tests2/test_foo.py").
499 """
500
501
502def import_path(

Callers 1

import_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…