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

Method test_is_socket_false

Lib/test/test_pathlib/test_pathlib.py:2737–2744  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2735 self.assertIs(self.cls(self.base, 'myfifo\x00').is_fifo(), False)
2736
2737 def test_is_socket_false(self):
2738 P = self.cls(self.base)
2739 self.assertFalse((P / 'fileA').is_socket())
2740 self.assertFalse((P / 'dirA').is_socket())
2741 self.assertFalse((P / 'non-existing').is_socket())
2742 self.assertFalse((P / 'fileA' / 'bah').is_socket())
2743 self.assertIs((P / 'fileA\udfff').is_socket(), False)
2744 self.assertIs((P / 'fileA\x00').is_socket(), False)
2745
2746 @unittest.skipUnless(hasattr(socket, "AF_UNIX"), "Unix sockets required")
2747 @unittest.skipIf(

Callers

nothing calls this directly

Calls 4

assertFalseMethod · 0.80
is_socketMethod · 0.80
clsMethod · 0.45
assertIsMethod · 0.45

Tested by

no test coverage detected