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

Method testBytesAddr

Lib/test/test_socket.py:6329–6334  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6327 self.assertEqual(self.sock.getsockname(), path)
6328
6329 def testBytesAddr(self):
6330 # Test binding to a bytes pathname.
6331 path = os.path.abspath(os_helper.TESTFN)
6332 self.bind(self.sock, self.encoded(path))
6333 self.addCleanup(os_helper.unlink, path)
6334 self.assertEqual(self.sock.getsockname(), path)
6335
6336 def testSurrogateescapeBind(self):
6337 # Test binding to a valid non-ASCII pathname, with the

Callers

nothing calls this directly

Calls 6

bindMethod · 0.95
encodedMethod · 0.95
addCleanupMethod · 0.80
abspathMethod · 0.45
assertEqualMethod · 0.45
getsocknameMethod · 0.45

Tested by

no test coverage detected