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

Method testUnencodableAddr

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

Source from the content-addressed store, hash-verified

6343 self.assertEqual(self.sock.getsockname(), path)
6344
6345 def testUnencodableAddr(self):
6346 # Test binding to a pathname that cannot be encoded in the
6347 # file system encoding.
6348 if os_helper.TESTFN_UNENCODABLE is None:
6349 self.skipTest("No unencodable filename available")
6350 path = os.path.abspath(os_helper.TESTFN_UNENCODABLE)
6351 self.bind(self.sock, path)
6352 self.addCleanup(os_helper.unlink, path)
6353 self.assertEqual(self.sock.getsockname(), path)
6354
6355 @unittest.skipIf(sys.platform in ('linux', 'android'),
6356 'Linux behavior is tested by TestLinuxAbstractNamespace')

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected