MCPcopy Index your code
hub / github.com/python/cpython / test_chown

Method test_chown

Lib/test/test_os/test_posix.py:2395–2405  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2393 os.chmod("file", 0o644, dir_fd=0)
2394
2395 def test_chown(self):
2396 self._verify_available("HAVE_FCHOWNAT")
2397 if self.mac_ver >= (10, 10):
2398 self.assertIn("HAVE_FCHOWNAT", posix._have_functions)
2399
2400 else:
2401 self.assertNotIn("HAVE_FCHOWNAT", posix._have_functions)
2402 self.assertIn("HAVE_LCHOWN", posix._have_functions)
2403
2404 with self.assertRaisesRegex(NotImplementedError, "dir_fd unavailable"):
2405 os.chown("file", 0, 0, dir_fd=0)
2406
2407 def test_link(self):
2408 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