summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-11-06 21:37:07 +0000
committerZachary Turner <zturner@google.com>2015-11-06 21:37:07 +0000
commit059e52c44ceda28ca21a0299bb171cad2da0bc4c (patch)
treec6c0ee9c88ccc6e6268d392a24946af812a9440f /lldb/packages/Python/lldbsuite
parent3cb66c85b91dcbf3d693f226a08c4bfa17b5d276 (diff)
downloadbcm5719-llvm-059e52c44ceda28ca21a0299bb171cad2da0bc4c.tar.gz
bcm5719-llvm-059e52c44ceda28ca21a0299bb171cad2da0bc4c.zip
Python 3 - Fix some issues with class / instance variables in unittest2.
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud