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

Method test_chown

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

Source from the content-addressed store, hash-verified

2303 os.chmod("file", 0o644, dir_fd=0)
2304
2305 def test_chown(self):
2306 self._verify_available("HAVE_FCHOWNAT")
2307 if self.mac_ver >= (10, 10):
2308 self.assertIn("HAVE_FCHOWNAT", posix._have_functions)
2309
2310 else:
2311 self.assertNotIn("HAVE_FCHOWNAT", posix._have_functions)
2312 self.assertIn("HAVE_LCHOWN", posix._have_functions)
2313
2314 with self.assertRaisesRegex(NotImplementedError, "dir_fd unavailable"):
2315 os.chown("file", 0, 0, dir_fd=0)
2316
2317 def test_link(self):
2318 self._verify_available("HAVE_LINKAT")

Callers

nothing calls this directly

Calls 5

_verify_availableMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
assertRaisesRegexMethod · 0.80
chownMethod · 0.80

Tested by

no test coverage detected