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

Method test_owner

Lib/test/test_pathlib/test_pathlib.py:2019–2024  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2017
2018 @unittest.skipUnless(pwd, "the pwd module is needed for this test")
2019 def test_owner(self):
2020 p = self.cls(self.base) / 'fileA'
2021 expected_uid = p.stat().st_uid
2022 expected_name = self._get_pw_name_or_skip_test(expected_uid)
2023
2024 self.assertEqual(expected_name, p.owner())
2025
2026 @unittest.skipUnless(pwd, "the pwd module is needed for this test")
2027 @requires_root_user

Callers

nothing calls this directly

Calls 5

ownerMethod · 0.80
clsMethod · 0.45
statMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected