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

Function test_importorskip

testing/test_skipping.py:1422–1427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1420
1421
1422def test_importorskip() -> None:
1423 with pytest.raises(
1424 pytest.skip.Exception,
1425 match="^could not import 'doesnotexist': No module named .*",
1426 ):
1427 pytest.importorskip("doesnotexist")
1428
1429
1430def test_relpath_rootdir(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected