forked from OSchip/llvm-project
059e52c44c
Explanation from a Python wizard (not me) about why this exhibited different behavior under Python 2 and Python 3. `cmp` is a builtin_function_or_method in Python 2.7, which doesn't have a __get__ and doesn't qualify as a "descriptor". Your lambda is a regular function which qualifies as a descriptor whose __get__ method returns a bound instance. His suggested fix was to write sortTestMethodsUsing = staticmethod(cmp_) However, I don't think `sortTestMethodsUsing` (or any of the other fields of `TestLoader`) should be class attributes anyway. They are all accessed through self, so they should be instance attributes. So the fix employed here is to convert them to instance attributes. Differential Revision: http://reviews.llvm.org/D14453 Reviewed By: Todd Fiala llvm-svn: 252346 |
||
---|---|---|
.. | ||
pexpect-2.4 | ||
progress | ||
six | ||
unittest2/unittest2 |