MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_chmod_dir_fd

Method test_chmod_dir_fd

Lib/test/test_posix.py:1620–1626  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1618
1619 @unittest.skipUnless(os.chmod in os.supports_dir_fd, "test needs dir_fd support in os.chmod()")
1620 def test_chmod_dir_fd(self):
1621 with self.prepare_file() as (dir_fd, name, fullname):
1622 posix.chmod(fullname, stat.S_IRUSR)
1623 posix.chmod(name, stat.S_IRUSR | stat.S_IWUSR, dir_fd=dir_fd)
1624 s = posix.stat(fullname)
1625 self.assertEqual(s.st_mode & stat.S_IRWXU,
1626 stat.S_IRUSR | stat.S_IWUSR)
1627
1628 @unittest.skipUnless(hasattr(os, 'chown') and (os.chown in os.supports_dir_fd),
1629 "test needs dir_fd support in os.chown()")

Callers

nothing calls this directly

Calls 4

prepare_fileMethod · 0.95
chmodMethod · 0.45
statMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected