New submission from Amaury Forgeot d'Arc: When patching a class, mock.create_autospec() correctly detects properties and __slot__ attributes, but not subclasses of property() or other kinds of data descriptors.
The attached patch detects all data descriptors and patch them the way they should be. ---------- components: Tests files: mock-descriptor.patch keywords: patch messages: 263361 nosy: amaury.forgeotdarc, michael.foord priority: normal severity: normal status: open title: Mock autospec does not work with subclasses of property() type: enhancement Added file: http://bugs.python.org/file42458/mock-descriptor.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26750> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com