Commit e309b35
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
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
146 | 152 | | |
147 | 153 | | |
148 | 154 | | |
| |||
0 commit comments