File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -292,10 +292,11 @@ def test_use_shell_is_mock_patchable_on_class_as_object_attribute(
292
292
correct one to restore, even by a normal setattr.
293
293
294
294
The effect is that some ways of simulating a class attribute with added behavior can
295
- cause a descriptor, such as a property, to be set to its own backing attribute
296
- during unpatching; then subsequent reads raise RecursionError. This happens if both
297
- (a) setting it on the class is customized in a metaclass and (b) getting it on
298
- instances is customized with a descriptor (such as a property) in the class itself.
295
+ cause a descriptor, such as a property, to be set as the value of its own backing
296
+ attribute during unpatching; then subsequent reads raise RecursionError. This
297
+ happens if both (a) setting it on the class is customized in a metaclass and (b)
298
+ getting it on instances is customized with a descriptor (such as a property) in the
299
+ class itself.
299
300
300
301
Although ideally code outside GitPython would not rely on being able to patch
301
302
Git.USE_SHELL with unittest.mock.patch, the technique is widespread. Thus, USE_SHELL
You can’t perform that action at this time.
0 commit comments