Commits

Antoine Pitrou  committed 8f3f1d1

s/is_sock/is_socket/

  • Participants
  • Parent commits 7905012
  • Branches pep428

Comments (0)

Files changed (3)

File docs/index.rst

    as permission errors) are propagated.
 
 
-.. method:: Path.is_sock()
+.. method:: Path.is_socket()
 
    Return True if the path points to a Unix socket (or a symbolic link
    pointing to a Unix socket), False if it points to another kind of file.
             # (see https://bitbucket.org/pitrou/pathlib/issue/12/)
             return False
 
-    def is_sock(self):
+    def is_socket(self):
         """
         Whether this path is a socket.
         """

File test_pathlib.py

         P = self.cls(BASE, 'myfifo')
         os.mkfifo(str(P))
         self.assertTrue(P.is_fifo())
-        self.assertFalse(P.is_sock())
+        self.assertFalse(P.is_socket())
         self.assertFalse(P.is_file())
 
-    def test_is_sock_false(self):
+    def test_is_socket_false(self):
         P = self.cls(BASE)
-        self.assertFalse((P / 'fileA').is_sock())
-        self.assertFalse((P / 'dirA').is_sock())
-        self.assertFalse((P / 'non-existing').is_sock())
+        self.assertFalse((P / 'fileA').is_socket())
+        self.assertFalse((P / 'dirA').is_socket())
+        self.assertFalse((P / 'non-existing').is_socket())
 
     @unittest.skipUnless(hasattr(socket, "AF_UNIX"), "Unix sockets required")
-    def test_is_sock_true(self):
+    def test_is_socket_true(self):
         P = self.cls(BASE, 'mysock')
         sock = socket.socket(socket.SOCK_STREAM, socket.AF_UNIX)
         self.addCleanup(sock.close)
         sock.bind(str(P))
-        self.assertTrue(P.is_sock())
+        self.assertTrue(P.is_socket())
         self.assertFalse(P.is_fifo())
         self.assertFalse(P.is_file())