MCPcopy Create free account
hub / github.com/RustPython/RustPython / test_chmod

Method test_chmod

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

Source from the content-addressed store, hash-verified

2291 os.access("file", os.R_OK, effective_ids=True)
2292
2293 def test_chmod(self):
2294 self._verify_available("HAVE_FCHMODAT")
2295 if self.mac_ver >= (10, 10):
2296 self.assertIn("HAVE_FCHMODAT", posix._have_functions)
2297
2298 else:
2299 self.assertNotIn("HAVE_FCHMODAT", posix._have_functions)
2300 self.assertIn("HAVE_LCHMOD", posix._have_functions)
2301
2302 with self.assertRaisesRegex(NotImplementedError, "dir_fd unavailable"):
2303 os.chmod("file", 0o644, dir_fd=0)
2304
2305 def test_chown(self):
2306 self._verify_available("HAVE_FCHOWNAT")

Callers

nothing calls this directly

Calls 5

_verify_availableMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
assertRaisesRegexMethod · 0.80
chmodMethod · 0.45

Tested by

no test coverage detected