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

Function requires_working_socket

Lib/test/support/__init__.py:648–658  ·  view source on GitHub ↗

Skip tests or modules that require working sockets Can be used as a function/class decorator or to skip an entire module.

(*, module=False)

Source from the content-addressed store, hash-verified

646)
647
648def requires_working_socket(*, module=False):
649 """Skip tests or modules that require working sockets
650
651 Can be used as a function/class decorator or to skip an entire module.
652 """
653 msg = "requires socket support"
654 if module:
655 if not has_socket_support:
656 raise unittest.SkipTest(msg)
657 else:
658 return unittest.skipUnless(has_socket_support, msg)
659
660
661@functools.cache

Callers 2

test_poll.pyFile · 0.90
test_asyncgen.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…