MCPcopy
hub / github.com/pytest-dev/pytest / chmod_r

Method chmod_r

testing/test_tmpdir.py:553–555  ·  testing/test_tmpdir.py::TestRmRf.chmod_r
(self, path)

Source from the content-addressed store, hash-verified

551 assert not fn.parent.is_dir()
552
553 def chmod_r(self, path):
554 mode = os.stat(str(path)).st_mode
555 os.chmod(str(path), mode & ~stat.S_IWRITE)
556
557 def test_rm_rf_with_read_only_directory(self, tmp_path):
558 class="st">""class="st">"Ensure rm_rf can remove read-only directories (class="cm">#5524)"class="st">""

Calls 2

statMethod · 0.80
chmodMethod · 0.80

Tested by

no test coverage detected