MCPcopy Create free account
hub / github.com/pytest-dev/pytest / chmod_r

Method chmod_r

testing/test_tmpdir.py:344–346  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

342 assert not fn.parent.is_dir()
343
344 def chmod_r(self, path):
345 mode = os.stat(str(path)).st_mode
346 os.chmod(str(path), mode & ~stat.S_IWRITE)
347
348 def test_rm_rf_with_read_only_directory(self, tmp_path):
349 """Ensure rm_rf can remove read-only directories (#5524)"""

Calls

no outgoing calls

Tested by

no test coverage detected