MCPcopy Create free account
hub / github.com/pytest-dev/pytest / ImportPathMismatchError

Class ImportPathMismatchError

src/_pytest/pathlib.py:445–451  ·  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

443
444
445class ImportPathMismatchError(ImportError):
446 """Raised on import_path() if there is a mismatch of __file__'s.
447
448 This can happen when `import_path` is called multiple times with different filenames that has
449 the same basename but reside in packages
450 (for example "/tests1/test_foo.py" and "/tests2/test_foo.py").
451 """
452
453
454def import_path(

Callers 1

import_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected