Skip to content

Commit 9f4b130

Browse files
committed
[lldb] Replace assertTrue(foo in bar) with assertIn(foo, bar)
The benefit of using assertIn is an improved error message when the assertion fails: AssertionError: False is not True becomes AssertionError: 'have ints 5 20 20 5' not found in '""'
1 parent 3f96438 commit 9f4b130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/test/API/macosx/skinny-corefile/TestSkinnyCorefile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_lc_note(self):
140140
self.assertEqual(to_be_removed_dirty_data.GetValueAsUnsigned(), 20)
141141

142142
present_heap_buf = f0.FindVariable("present_heap_buf")
143-
self.assertTrue("have ints 5 20 20 5" in present_heap_buf.GetSummary())
143+
self.assertIn("have ints 5 20 20 5", present_heap_buf.GetSummary())
144144

145145

146146
# f1 is to_be_removed() in libto-be-removed.dylib

0 commit comments

Comments
 (0)