forked from OSchip/llvm-project
[lldb] Improve assert message in TestCPPAccelerator
`log` is just some IO object that gets printed as `<_io.TextIOWrapper = filename` but the intention here was to print the actual found log contents.
This commit is contained in:
parent
551d118805
commit
956df6fa62
|
@ -23,11 +23,12 @@ class CPPAcceleratorTableTestCase(TestBase):
|
|||
# of it not being in the first file looked at.
|
||||
self.expect('frame variable inner_d')
|
||||
|
||||
log = open(logfile, 'r')
|
||||
with open(logfile) as f:
|
||||
log = f.readlines()
|
||||
n = 0
|
||||
for line in log:
|
||||
if re.findall(r'[abcdefg]\.o: FindByNameAndTag\(\)', line):
|
||||
self.assertIn("d.o", line)
|
||||
n += 1
|
||||
|
||||
self.assertEqual(n, 1, log)
|
||||
self.assertEqual(n, 1, "".join(log))
|
||||
|
|
Loading…
Reference in New Issue