diff options
author | Zachary Turner <zturner@google.com> | 2015-11-05 19:21:56 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-11-05 19:21:56 +0000 |
commit | 71d468be66cbdff20426508a2c117c0af833d54a (patch) | |
tree | 565ac5a5f1ff80b28793d3b995c23d8c4a254c6f /lldb/third_party | |
parent | 56584698acc154e9a1cb6800a62b4d8bbce26efd (diff) | |
download | llvm-71d468be66cbdff20426508a2c117c0af833d54a.tar.gz |
Python 3 - Fix usage of `unicode` in unittest2.
llvm-svn: 252189
Diffstat (limited to 'lldb/third_party')
-rw-r--r-- | lldb/third_party/Python/module/unittest2/unittest2/case.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/third_party/Python/module/unittest2/unittest2/case.py b/lldb/third_party/Python/module/unittest2/unittest2/case.py index 68a9a7a42d15..de7cb6a71e98 100644 --- a/lldb/third_party/Python/module/unittest2/unittest2/case.py +++ b/lldb/third_party/Python/module/unittest2/unittest2/case.py @@ -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. |