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

Method test_access

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

Source from the content-addressed store, hash-verified

2274 self.assertNotIn("HAVE_PTSNAME_R", posix._have_functions)
2275
2276 def test_access(self):
2277 self._verify_available("HAVE_FACCESSAT")
2278 if self.mac_ver >= (10, 10):
2279 self.assertIn("HAVE_FACCESSAT", posix._have_functions)
2280
2281 else:
2282 self.assertNotIn("HAVE_FACCESSAT", posix._have_functions)
2283
2284 with self.assertRaisesRegex(NotImplementedError, "dir_fd unavailable"):
2285 os.access("file", os.R_OK, dir_fd=0)
2286
2287 with self.assertRaisesRegex(NotImplementedError, "follow_symlinks unavailable"):
2288 os.access("file", os.R_OK, follow_symlinks=False)
2289
2290 with self.assertRaisesRegex(NotImplementedError, "effective_ids unavailable"):
2291 os.access("file", os.R_OK, effective_ids=True)
2292
2293 def test_chmod(self):
2294 self._verify_available("HAVE_FCHMODAT")

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected