[Lldb-commits] [lldb] r252189 - Python 3 - Fix usage of `unicode` in unittest2.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 5 11:21:56 PST 2015
Author: zturner
Date: Thu Nov 5 13:21:56 2015
New Revision: 252189
URL: http://llvm.org/viewvc/llvm-project?rev=252189&view=rev
Log:
Python 3 - Fix usage of `unicode` in unittest2.
Modified:
lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py
Modified: lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py?rev=252189&r1=252188&r2=252189&view=diff
==============================================================================
--- lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py (original)
+++ lldb/trunk/third_party/Python/module/unittest2/unittest2/case.py Thu Nov 5 13:21:56 2015
@@ -236,7 +236,10 @@ class TestCase(unittest.TestCase):
self.addTypeEqualityFunc(tuple, 'assertTupleEqual')
self.addTypeEqualityFunc(set, 'assertSetEqual')
self.addTypeEqualityFunc(frozenset, 'assertSetEqual')
- self.addTypeEqualityFunc(unicode, 'assertMultiLineEqual')
+ if six.PY2:
+ self.addTypeEqualityFunc(unicode, 'assertMultiLineEqual')
+ else:
+ self.addTypeEqualityFunc(str, 'assertMultiLineEqual')
def addTypeEqualityFunc(self, typeobj, function):
"""Add a type specific assertEqual style function to compare a type.
More information about the lldb-commits
mailing list