Staging
v0.5.1
v0.5.1
Revision 696d2324cf2a54e20e8d6a6739fa97ba815a8be9 authored by Miss Islington (bot) on 29 January 2020, 16:15:36 UTC, committed by GitHub on 29 January 2020, 16:15:36 UTC
Replace check for whether something is a method in the mock module. The previous version fails on PyPy, because there no method wrappers exist (everything looks like a regular Python-defined function). Thus the isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check returns True for any descriptor, not just methods. This condition could also return erroneously True in CPython for C-defined descriptors. Instead to decide whether something is a method, just check directly whether it's a function defined on the class. This passes all tests on CPython and fixes the bug on PyPy. (cherry picked from commit a327677905956ae0b239ff430a1346dfe265709e) Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de> Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
1 parent 2b675f0
File | Mode | Size |
---|---|---|
ax_c_float_words_bigendian.m4 | -rw-r--r-- | 3.1 KB |
ax_check_openssl.m4 | -rw-r--r-- | 4.1 KB |
Computing file changes ...