summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/file_handle
diff options
context:
space:
mode:
authorLawrence D'Anna <lawrence_danna@apple.com>2019-10-10 18:38:23 +0000
committerLawrence D'Anna <lawrence_danna@apple.com>2019-10-10 18:38:23 +0000
commit4faec5e01ad1d39d0fb7cab47a96f196b3c5685b (patch)
treea2040a96411e35995a1e4bd40ea25553791738f1 /lldb/packages/Python/lldbsuite/test/python_api/file_handle
parent63bb6737cee932331468107f6800273fff520ab4 (diff)
downloadbcm5719-llvm-4faec5e01ad1d39d0fb7cab47a96f196b3c5685b.tar.gz
bcm5719-llvm-4faec5e01ad1d39d0fb7cab47a96f196b3c5685b.zip
TestFileHandle.py: fix for Python 3.6
Summary: Python 3.6 stringifies exceptions as `ExceptionClass("foo",)` instead of `ExceptionClass("foo")`. This patch makes the test assertions a little more flexible so the test passes anyway. Reviewers: JDevlieghere, jasonmolenda, labath Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68745 llvm-svn: 374417
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/file_handle')
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py b/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
index 876a149eada..5bd72e81015 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
+++ b/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
@@ -676,11 +676,11 @@ class FileHandleTestCase(lldbtest.TestBase):
error, n = lldb.SBFile(BadIO()).Write(b"FOO")
self.assertEqual(n, 0)
self.assertTrue(error.Fail())
- self.assertEqual(error.GetCString(), "OhNoe('OH NOE')")
+ self.assertIn('OH NOE', error.GetCString())
error, n = lldb.SBFile(BadIO()).Read(bytearray(100))
self.assertEqual(n, 0)
self.assertTrue(error.Fail())
- self.assertEqual(error.GetCString(), "OhNoe('OH NOE')")
+ self.assertIn('OH NOE', error.GetCString())
@add_test_categories(['pyapi'])
OpenPOWER on IntegriCloud