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

Method encoded

Lib/test/test_socket.py:6295–6304  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

6293 self.sock.close()
6294
6295 def encoded(self, path):
6296 # Return the given path encoded in the file system encoding,
6297 # or skip the test if this is not possible.
6298 try:
6299 return os.fsencode(path)
6300 except UnicodeEncodeError:
6301 self.skipTest(
6302 "Pathname {0!a} cannot be represented in file "
6303 "system encoding {1!r}".format(
6304 path, sys.getfilesystemencoding()))
6305
6306 def bind(self, sock, path):
6307 # Bind the socket

Callers 2

testBytesAddrMethod · 0.95

Calls 2

skipTestMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected