forked from OSchip/llvm-project
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
This commit is contained in:
parent
63bb6737ce
commit
4faec5e01a
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue