def test_getPermissions_Windows(self):
        """
        Getting permissions for a file returns a L{Permissions} object in
        Windows.  Windows requires a different test, because user permissions
        = group permissions = other permissions.  Also, chmod may not be able
        to set the execute bit, so we are skipping tests that set the execute
        bit.
        """
        # Change permission after test so file can be deleted
        self.addCleanup(self.path.child(b"sub1").chmod, 0o777)

        for mode in (0o777, 0o555):
            self.path.child(b"sub1").chmod(mode)
            self.assertEqual(self.path.child(b"sub1").getPermissions(),
                              filepath.Permissions(mode))
        self.path.child(b"sub1").chmod(0o511) #sanity check to make sure that
        # user=group=other permissions
        self.assertEqual(self.path.child(b"sub1").getPermissions().shorthand(),
                          "r-xr-xr-x")

        Getting permissions for a file returns a L{Permissions} object in
        Windows.  Windows requires a different test, because user permissions
        = group permissions = other permissions.  Also, chmod may not be able
        to set the execute bit, so we are skipping tests that set the execute
        bit.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py