def test_getPermissions_POSIX(self):
        """
        Getting permissions for a file returns a L{Permissions} object for
        POSIX platforms (which supports separate user, group, and other
        permissions bits.
        """
        for mode in (0o777, 0o700):
            self.path.child(b"sub1").chmod(mode)
            self.assertEqual(self.path.child(b"sub1").getPermissions(),
                              filepath.Permissions(mode))
        self.path.child(b"sub1").chmod(0o764) #sanity check
        self.assertEqual(
            self.path.child(b"sub1").getPermissions().shorthand(),
            "rwxrw-r--")

        Getting permissions for a file returns a L{Permissions} object for
        POSIX platforms (which supports separate user, group, and other
        permissions bits.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py