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

Method testStrAddr

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

Source from the content-addressed store, hash-verified

6320 self.assertIn(self.sock.getsockname(), ('', None))
6321
6322 def testStrAddr(self):
6323 # Test binding to and retrieving a normal string pathname.
6324 path = os.path.abspath(os_helper.TESTFN)
6325 self.bind(self.sock, path)
6326 self.addCleanup(os_helper.unlink, path)
6327 self.assertEqual(self.sock.getsockname(), path)
6328
6329 def testBytesAddr(self):
6330 # Test binding to a bytes pathname.

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected