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

Method test_chown_without_permission

Lib/test/test_os.py:2068–2073  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2066 @unittest.skipUnless(not root_in_posix and len(all_users) > 1,
2067 "test needs non-root account and more than one user")
2068 def test_chown_without_permission(self):
2069 uid_1, uid_2 = all_users[:2]
2070 gid = os.stat(os_helper.TESTFN).st_gid
2071 with self.assertRaises(PermissionError):
2072 os.chown(os_helper.TESTFN, uid_1, gid)
2073 os.chown(os_helper.TESTFN, uid_2, gid)
2074
2075 @classmethod
2076 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 3

chownMethod · 0.80
statMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected