Mock out lchmod functions in _patch_for_wrapping_test? · gitpython-developers/GitPython@e309b35 · GitHub
Skip to content

Commit e309b35

Browse files
committed
Mock out lchmod functions in _patch_for_wrapping_test?
TestRmtree._patch_for_wrapping_test already mocked out the regular chmod functions in the os module and the Path class, to test what happens when changing permissions cannot fix an error. But there are also, on some systems and Python versions, lchmod versions of these functions. This patches those as well. I am not sure this should really be done. The problem is that calling such functions is fairly likely to raise an exception if it is not properly conditioned on a check for their actual usability, and mocking them out could obscure such a bug.
1 parent 5c6a4f4 commit e309b35

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/test_util.py

Lines changed: 7 additions & 1 deletion

0 commit comments

Comments
 (0)