MCPcopy Index your code
hub / github.com/python/cpython / import_or_skip

Function import_or_skip

Lib/test/test_zipfile/_path/_support.py:5–9  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

3
4
5def import_or_skip(name):
6 try:
7 return importlib.import_module(name)
8 except ImportError: # pragma: no cover
9 raise unittest.SkipTest(f'Unable to import {name}')

Callers 1

test_complexity.pyFile · 0.85

Calls 1

import_moduleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…