[Lldb-commits] [lldb] 3cc3762 - [lldb] Use assertIn/NotIn over assertTrue/False (NFC)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 6 11:52:16 PST 2021


Author: Dave Lee
Date: 2021-02-06T11:52:01-08:00
New Revision: 3cc37622921f39e4bdad7a37b7199defa58a213a

URL: https://github.com/llvm/llvm-project/commit/3cc37622921f39e4bdad7a37b7199defa58a213a
DIFF: https://github.com/llvm/llvm-project/commit/3cc37622921f39e4bdad7a37b7199defa58a213a.diff

LOG: [lldb] Use assertIn/NotIn over assertTrue/False (NFC)

For improved failure messages, use `assertIn` over `assertTrue`.

Differential Revision: https://reviews.llvm.org/D96095

Added: 
    

Modified: 
    lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py
    lldb/test/API/commands/frame/var/TestFrameVar.py
    lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
    lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
    lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
    lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
    lldb/test/API/functionalities/history/TestHistoryRecall.py
    lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
    lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
    lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
    lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
    lldb/test/API/functionalities/source-map/TestTargetSourceMap.py
    lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
    lldb/test/API/functionalities/step_scripted/TestStepScripted.py
    lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
    lldb/test/API/functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py
    lldb/test/API/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
    lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
    lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
    lldb/test/API/lang/c/vla/TestVLA.py
    lldb/test/API/lang/cpp/accelerator-table/TestCPPAccelerator.py
    lldb/test/API/lang/cpp/class_static/TestStaticVariables.py
    lldb/test/API/lang/cpp/class_types/TestClassTypes.py
    lldb/test/API/lang/objc/direct-dispatch-step/TestObjCDirectDispatchStepping.py
    lldb/test/API/lang/objc/exceptions/TestObjCExceptions.py
    lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
    lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
    lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
    lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
    lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py
    lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
    lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py
    lldb/test/API/tools/lldb-server/TestGdbRemote_vCont.py
    lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
    lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
    lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py
    lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
    lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
    lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py b/lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py
index 083d97adf1b2..ab1438479aab 100644
--- a/lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py
+++ b/lldb/test/API/commands/expression/dont_allow_jit/TestAllowJIT.py
@@ -69,7 +69,7 @@ def expr_options_test(self):
         # Again use it and ensure we fail:
         result = frame.EvaluateExpression("call_me(10)", options)
         self.assertTrue(result.GetError().Fail(), "expression failed with no JIT")
-        self.assertTrue("Can't evaluate the expression without a running target" in result.GetError().GetCString(), "Got right error")
+        self.assertIn("Can't evaluate the expression without a running target", result.GetError().GetCString(), "Got right error")
 
         # Finally set the allow JIT value back to true and make sure that works:
         options.SetAllowJIT(True)

diff  --git a/lldb/test/API/commands/frame/var/TestFrameVar.py b/lldb/test/API/commands/frame/var/TestFrameVar.py
index 0e053eb945dd..6b67e41ab74c 100644
--- a/lldb/test/API/commands/frame/var/TestFrameVar.py
+++ b/lldb/test/API/commands/frame/var/TestFrameVar.py
@@ -64,28 +64,28 @@ def do_test(self):
         result = interp.HandleCommand("frame var -l", command_result)
         self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
         output = command_result.GetOutput()
-        self.assertTrue("argc" in output, "Args didn't find argc")
-        self.assertTrue("argv" in output, "Args didn't find argv")
-        self.assertTrue("test_var" not in output, "Args found a local")
-        self.assertTrue("g_var" not in output, "Args found a global")
+        self.assertIn("argc", output, "Args didn't find argc")
+        self.assertIn("argv", output, "Args didn't find argv")
+        self.assertNotIn("test_var", output, "Args found a local")
+        self.assertNotIn("g_var", output, "Args found a global")
 
         # Just get locals:
         result = interp.HandleCommand("frame var -a", command_result)
         self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
         output = command_result.GetOutput()
-        self.assertTrue("argc" not in output, "Locals found argc")
-        self.assertTrue("argv" not in output, "Locals found argv")
-        self.assertTrue("test_var" in output, "Locals didn't find test_var")
-        self.assertTrue("g_var" not in output, "Locals found a global")
+        self.assertNotIn("argc", output, "Locals found argc")
+        self.assertNotIn("argv", output, "Locals found argv")
+        self.assertIn("test_var", output, "Locals didn't find test_var")
+        self.assertNotIn("g_var", output, "Locals found a global")
 
         # Get the file statics:
         result = interp.HandleCommand("frame var -l -a -g", command_result)
         self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
         output = command_result.GetOutput()
-        self.assertTrue("argc" not in output, "Globals found argc")
-        self.assertTrue("argv" not in output, "Globals found argv")
-        self.assertTrue("test_var" not in output, "Globals found test_var")
-        self.assertTrue("g_var" in output, "Globals didn't find g_var")
+        self.assertNotIn("argc", output, "Globals found argc")
+        self.assertNotIn("argv", output, "Globals found argv")
+        self.assertNotIn("test_var", output, "Globals found test_var")
+        self.assertIn("g_var", output, "Globals didn't find g_var")
 
 
 

diff  --git a/lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py b/lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
index ac419ccf69a2..aee8d05ec241 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
@@ -288,14 +288,14 @@ def do_check_configuring_names(self):
         name_list = lldb.SBStringList()
         self.target.GetBreakpointNames(name_list)
         for name_string in [self.bp_name_string, other_bp_name_string, cl_bp_name_string]:
-            self.assertTrue(name_string in name_list, "Didn't find %s in names"%(name_string))
+            self.assertIn(name_string, name_list, "Didn't find %s in names"%(name_string))
 
         # Delete the name from the current target.  Make sure that works and deletes the
         # name from the breakpoint as well:
         self.target.DeleteBreakpointName(self.bp_name_string)
         name_list.Clear()
         self.target.GetBreakpointNames(name_list)
-        self.assertTrue(self.bp_name_string not in name_list, "Didn't delete %s from a real target"%(self.bp_name_string))
+        self.assertNotIn(self.bp_name_string, name_list, "Didn't delete %s from a real target"%(self.bp_name_string))
         # Also make sure the name got removed from breakpoints holding it:
         self.assertFalse(bkpt.MatchesName(self.bp_name_string), "Didn't remove the name from the breakpoint.")
 
@@ -305,7 +305,7 @@ def do_check_configuring_names(self):
         dummy_target.DeleteBreakpointName(self.bp_name_string)
         name_list.Clear()
         dummy_target.GetBreakpointNames(name_list)
-        self.assertTrue(self.bp_name_string not in name_list, "Didn't delete %s from the dummy target"%(self.bp_name_string))
+        self.assertNotIn(self.bp_name_string, name_list, "Didn't delete %s from the dummy target"%(self.bp_name_string))
         # Also make sure the name got removed from breakpoints holding it:
         self.assertFalse(bkpt.MatchesName(self.bp_name_string), "Didn't remove the name from the breakpoint.")
 

diff  --git a/lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py b/lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
index 2164ddfb8f6a..0e958bd2943d 100644
--- a/lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
+++ b/lldb/test/API/functionalities/breakpoint/debugbreak/TestDebugBreak.py
@@ -37,8 +37,8 @@ def test_asm_int_3(self):
         # We should be in funciton 'bar'.
         self.assertTrue(frame.IsValid())
         function_name = frame.GetFunctionName()
-        self.assertTrue('bar' in function_name,
-                        "Unexpected function name {}".format(function_name))
+        self.assertIn('bar', function_name,
+                      "Unexpected function name {}".format(function_name))
 
         # We should be able to evaluate the parameter foo.
         value = frame.EvaluateExpression('*foo')

diff  --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
index f2f9f670c714..e2b882e6befe 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
@@ -23,7 +23,7 @@ def check_variable(self, name):
         self.assertTrue(var.IsValid())
 
         queue = self.namespace + '::queue'
-        self.assertTrue(queue in var.GetDisplayTypeName())
+        self.assertIn(queue, var.GetDisplayTypeName())
         self.assertEqual(var.GetNumChildren(), 5)
         for i in range(5):
             ch = var.GetChildAtIndex(i)

diff  --git a/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py b/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
index 54f1e8a220ab..c95e4a41e881 100644
--- a/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ b/lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -96,7 +96,7 @@ def test_read_registers_using_p_packets(self):
         process = self.connect(target)
 
         self.read_registers(process)
-        self.assertFalse("g" in self.server.responder.packetLog)
+        self.assertNotIn("g", self.server.responder.packetLog)
         self.assertGreater(
                 len([p for p in self.server.responder.packetLog if p.startswith("p")]), 0)
 

diff  --git a/lldb/test/API/functionalities/history/TestHistoryRecall.py b/lldb/test/API/functionalities/history/TestHistoryRecall.py
index 18ab2ca0fe6e..4be4bdd6d9a1 100644
--- a/lldb/test/API/functionalities/history/TestHistoryRecall.py
+++ b/lldb/test/API/functionalities/history/TestHistoryRecall.py
@@ -30,8 +30,8 @@ def sample_test(self):
 
         interp.HandleCommand("!0", result, False)
         self.assertTrue(result.Succeeded(), "!0 command did not work: %s"%(result.GetError()))
-        self.assertTrue("session history" in result.GetOutput(), "!0 didn't rerun session history")
+        self.assertIn("session history", result.GetOutput(), "!0 didn't rerun session history")
 
         interp.HandleCommand("!-1", result, False)
         self.assertTrue(result.Succeeded(), "!-1 command did not work: %s"%(result.GetError()))
-        self.assertTrue("host:" in result.GetOutput(), "!-1 didn't rerun platform list.")
+        self.assertIn("host:", result.GetOutput(), "!-1 didn't rerun platform list.")

diff  --git a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
index dca713b1f796..f711b36657fa 100644
--- a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
+++ b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
@@ -113,6 +113,6 @@ def run_python_os_step_missing_thread(self, do_prune):
             self.process.Continue()
             os_thread = self.get_os_thread()
             self.assertTrue(os_thread.IsValid(), "The OS thread is back after continue")
-            self.assertTrue("step out" in os_thread.GetStopDescription(100), "Completed step out plan")
+            self.assertIn("step out", os_thread.GetStopDescription(100), "Completed step out plan")
         
         

diff  --git a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
index 103e86efc54d..76fd8746aa2a 100644
--- a/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
+++ b/lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
@@ -110,7 +110,7 @@ def test_memory_region_name(self):
             ci.HandleCommand(command, result, False)
             message = 'Ensure memory "%s" shows up in output for "%s"' % (
                 region_name, command)
-            self.assertTrue(region_name in result.GetOutput(), message)
+            self.assertIn(region_name, result.GetOutput(), message)
 
     def test_thread_info_in_minidump(self):
         """Test that lldb can read the thread information from the Minidump."""
@@ -122,7 +122,7 @@ def test_thread_info_in_minidump(self):
         thread = self.process.GetThreadAtIndex(0)
         self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal)
         stop_description = thread.GetStopDescription(256)
-        self.assertTrue("SIGSEGV" in stop_description)
+        self.assertIn("SIGSEGV", stop_description)
 
     def test_stack_info_in_minidump(self):
         """Test that we can see a trivial stack in a breakpad-generated Minidump."""
@@ -333,7 +333,7 @@ def do_test_deeper_stack(self, binary, core, pid):
             frame = thread.GetFrameAtIndex(index)
             self.assertTrue(frame.IsValid())
             function_name = frame.GetFunctionName()
-            self.assertTrue(name in function_name)
+            self.assertIn(name, function_name)
 
     @skipIfLLVMTargetMissing("X86")
     def test_deeper_stack_in_minidump(self):

diff  --git a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
index c3301fb323c8..15031ce563c7 100644
--- a/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
+++ b/lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
@@ -38,7 +38,7 @@ def test_thread_info_in_mini_dump(self):
         thread = self.process.GetThreadAtIndex(0)
         self.assertEqual(thread.GetStopReason(), lldb.eStopReasonException)
         stop_description = thread.GetStopDescription(256)
-        self.assertTrue("0xc0000005" in stop_description)
+        self.assertIn("0xc0000005", stop_description)
 
     def test_modules_in_mini_dump(self):
         """Test that lldb can read the list of modules from the minidump."""
@@ -136,7 +136,7 @@ def test_deeper_stack_in_mini_dump(self):
                 frame = thread.GetFrameAtIndex(index)
                 self.assertTrue(frame.IsValid())
                 function_name = frame.GetFunctionName()
-                self.assertTrue(name in function_name)
+                self.assertIn(name, function_name)
 
         finally:
             # Clean up the mini dump file.

diff  --git a/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py b/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
index 3812b197a32e..7b6754972edf 100644
--- a/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
+++ b/lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
@@ -56,7 +56,7 @@ def test_save_windows_mini_dump(self):
                 os.path.join(
                     f.GetDirectory(),
                     f.GetFilename()) for f in files]
-            self.assertTrue(exe in paths)
+            self.assertIn(exe, paths)
 
         finally:
             # Clean up the mini dump file.

diff  --git a/lldb/test/API/functionalities/source-map/TestTargetSourceMap.py b/lldb/test/API/functionalities/source-map/TestTargetSourceMap.py
index 6457c766813e..fcec6c88cbc9 100644
--- a/lldb/test/API/functionalities/source-map/TestTargetSourceMap.py
+++ b/lldb/test/API/functionalities/source-map/TestTargetSourceMap.py
@@ -24,7 +24,7 @@ def assertBreakpointWithSourceMap(src_path):
             self.dbg.GetCommandInterpreter().HandleCommand("source list -f main.c -l 2", retval)
             self.assertTrue(retval.Succeeded(), "source list didn't succeed.")
             self.assertNotEqual(retval.GetOutput(), None, "We got no ouput from source list")
-            self.assertTrue("return" in retval.GetOutput(), "We didn't find the source file...")
+            self.assertIn("return", retval.GetOutput(), "We didn't find the source file...")
 
         # Set the target soure map to map "./" to the current test directory
         src_dir = self.getSourceDir()

diff  --git a/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py b/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
index d4903b5269a4..58ae0fdf7880 100644
--- a/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
+++ b/lldb/test/API/functionalities/stats_api/TestStatisticsAPI.py
@@ -28,7 +28,7 @@ def test_stats_api(self):
         res = stats.GetAsJSON(stream)
         stats_json = sorted(json.loads(stream.GetData()))
         self.assertEqual(len(stats_json), 4)
-        self.assertTrue("Number of expr evaluation failures" in stats_json)
-        self.assertTrue("Number of expr evaluation successes" in stats_json)
-        self.assertTrue("Number of frame var failures" in stats_json)
-        self.assertTrue("Number of frame var successes" in stats_json)
+        self.assertIn("Number of expr evaluation failures", stats_json)
+        self.assertIn("Number of expr evaluation successes", stats_json)
+        self.assertIn("Number of frame var failures", stats_json)
+        self.assertIn("Number of frame var successes", stats_json)

diff  --git a/lldb/test/API/functionalities/step_scripted/TestStepScripted.py b/lldb/test/API/functionalities/step_scripted/TestStepScripted.py
index cee0885da9c3..de91105e3f61 100644
--- a/lldb/test/API/functionalities/step_scripted/TestStepScripted.py
+++ b/lldb/test/API/functionalities/step_scripted/TestStepScripted.py
@@ -59,7 +59,7 @@ def test_misspelled_plan_name(self):
         # Make sure we got a good error:
         self.assertTrue(err.Fail(), "We got a failure state")
         msg = err.GetCString()
-        self.assertTrue("NoSuchModule.NoSuchPlan" in msg, "Mentioned missing class")
+        self.assertIn("NoSuchModule.NoSuchPlan", msg, "Mentioned missing class")
         
         # Make sure we didn't let the process run:
         self.assertEqual(stop_id, process.GetStopID(), "Process didn't run")

diff  --git a/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py b/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
index 3f7e060a9c9c..9772ceea989a 100644
--- a/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
+++ b/lldb/test/API/functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py
@@ -61,5 +61,5 @@ def test_cross_dso_tail_calls(self):
         ]
         for idx, (name, is_artificial) in enumerate(expected_frames):
             frame = thread.GetFrameAtIndex(idx)
-            self.assertTrue(name in frame.GetDisplayFunctionName())
+            self.assertIn(name, frame.GetDisplayFunctionName())
             self.assertEqual(frame.IsArtificial(), is_artificial)

diff  --git a/lldb/test/API/functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py b/lldb/test/API/functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py
index e04ef96f2790..223b7c79a366 100644
--- a/lldb/test/API/functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py
+++ b/lldb/test/API/functionalities/tail_call_frames/cross_object/TestCrossObjectTailCalls.py
@@ -56,5 +56,5 @@ def test_cross_object_tail_calls(self):
         ]
         for idx, (name, is_artificial) in enumerate(expected_frames):
             frame = thread.GetFrameAtIndex(idx)
-            self.assertTrue(name in frame.GetDisplayFunctionName())
+            self.assertIn(name, frame.GetDisplayFunctionName())
             self.assertEqual(frame.IsArtificial(), is_artificial)

diff  --git a/lldb/test/API/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py b/lldb/test/API/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
index ebd654892abd..d26bc02c2a40 100644
--- a/lldb/test/API/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
+++ b/lldb/test/API/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
@@ -61,5 +61,5 @@ def do_test(self):
             # platform-dependent. E.g we see "void sink(void)" on Windows, but
             # "sink()" on Darwin. This seems like a bug -- just work around it
             # for now.
-            self.assertTrue(name in frame.GetDisplayFunctionName())
+            self.assertIn(name, frame.GetDisplayFunctionName())
             self.assertEqual(frame.IsArtificial(), is_artificial)

diff  --git a/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py b/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
index 1b71de5d2732..e783ae0e8d89 100644
--- a/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
+++ b/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
@@ -63,7 +63,7 @@ def tsan_tests(self):
         process = self.dbg.GetSelectedTarget().process
         thread = process.GetSelectedThread()
         frame = thread.GetSelectedFrame()
-        self.assertTrue("__tsan_on_report" in frame.GetFunctionName())
+        self.assertIn("__tsan_on_report", frame.GetFunctionName())
 
         # The stopped thread backtrace should contain either line1 or line2
         # from main.c.

diff  --git a/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py b/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
index 6b51e5e53c8e..23f1296bf12e 100644
--- a/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
+++ b/lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py
@@ -51,7 +51,7 @@ def ubsan_tests(self):
             substrs=['1 match found'])
 
         # We should be stopped in __ubsan_on_report
-        self.assertTrue("__ubsan_on_report" in frame.GetFunctionName())
+        self.assertIn("__ubsan_on_report", frame.GetFunctionName())
 
         # The stopped thread backtrace should contain either 'align line'
         found = False

diff  --git a/lldb/test/API/lang/c/vla/TestVLA.py b/lldb/test/API/lang/c/vla/TestVLA.py
index 09439e2bc4bd..aaf8767246e8 100644
--- a/lldb/test/API/lang/c/vla/TestVLA.py
+++ b/lldb/test/API/lang/c/vla/TestVLA.py
@@ -24,7 +24,7 @@ def test_variable_list(self):
         var_opts.SetUseDynamic(lldb.eDynamicCanRunTarget)
         all_locals = self.frame().GetVariables(var_opts)
         for value in all_locals:
-            self.assertFalse("vla_expr" in value.name)
+            self.assertNotIn("vla_expr", value.name)
 
     @decorators.skipIf(compiler="clang", compiler_version=['<', '8.0'])
     def test_vla(self):

diff  --git a/lldb/test/API/lang/cpp/accelerator-table/TestCPPAccelerator.py b/lldb/test/API/lang/cpp/accelerator-table/TestCPPAccelerator.py
index 54c5cccb9738..c48ecfe97b48 100644
--- a/lldb/test/API/lang/cpp/accelerator-table/TestCPPAccelerator.py
+++ b/lldb/test/API/lang/cpp/accelerator-table/TestCPPAccelerator.py
@@ -29,7 +29,7 @@ def test(self):
         n = 0
         for line in log:
             if re.findall(r'[abcdefg]\.o: FindByNameAndTag\(\)', line):
-                self.assertTrue("d.o" in line)
+                self.assertIn("d.o", line)
                 n += 1
 
         self.assertEqual(n, 1, log)

diff  --git a/lldb/test/API/lang/cpp/class_static/TestStaticVariables.py b/lldb/test/API/lang/cpp/class_static/TestStaticVariables.py
index c666ede90a12..3a065452ab74 100644
--- a/lldb/test/API/lang/cpp/class_static/TestStaticVariables.py
+++ b/lldb/test/API/lang/cpp/class_static/TestStaticVariables.py
@@ -138,7 +138,7 @@ def test_with_python_api(self):
         for val in valList:
             self.DebugSBValue(val)
             name = val.GetName()
-            self.assertTrue(name in ['g_points', 'A::g_points'])
+            self.assertIn(name, ['g_points', 'A::g_points'])
             if name == 'g_points':
                 self.assertEqual(
                     val.GetValueType(), lldb.eValueTypeVariableStatic)

diff  --git a/lldb/test/API/lang/cpp/class_types/TestClassTypes.py b/lldb/test/API/lang/cpp/class_types/TestClassTypes.py
index 8e77e9fb31c0..c47df758e24b 100644
--- a/lldb/test/API/lang/cpp/class_types/TestClassTypes.py
+++ b/lldb/test/API/lang/cpp/class_types/TestClassTypes.py
@@ -220,5 +220,5 @@ def test_with_constructor_name(self):
         frame = thread.frames[0]
         self.assertTrue(frame.IsValid(), "Got a valid frame.")
 
-        self.assertTrue("C::C" in frame.name,
-                        "Constructor name includes class name.")
+        self.assertIn("C::C", frame.name,
+                      "Constructor name includes class name.")

diff  --git a/lldb/test/API/lang/objc/direct-dispatch-step/TestObjCDirectDispatchStepping.py b/lldb/test/API/lang/objc/direct-dispatch-step/TestObjCDirectDispatchStepping.py
index 354976807846..25aef29a94e6 100644
--- a/lldb/test/API/lang/objc/direct-dispatch-step/TestObjCDirectDispatchStepping.py
+++ b/lldb/test/API/lang/objc/direct-dispatch-step/TestObjCDirectDispatchStepping.py
@@ -36,7 +36,7 @@ def test_with_python_api(self):
         for idx in range(2,16):
             thread.StepInto()
             func_name = thread.GetFrameAtIndex(0).GetFunctionName()
-            self.assertTrue("OverridesALot" in func_name, "%d'th step did not match name: %s"%(idx, func_name))
+            self.assertIn("OverridesALot", func_name, "%d'th step did not match name: %s"%(idx, func_name))
             stop_threads = lldbutil.continue_to_breakpoint(process, stop_bkpt)
             self.assertEqual(len(stop_threads), 1)
             self.assertEqual(stop_threads[0], thread)

diff  --git a/lldb/test/API/lang/objc/exceptions/TestObjCExceptions.py b/lldb/test/API/lang/objc/exceptions/TestObjCExceptions.py
index 9da68006c642..d72334a1d38b 100644
--- a/lldb/test/API/lang/objc/exceptions/TestObjCExceptions.py
+++ b/lldb/test/API/lang/objc/exceptions/TestObjCExceptions.py
@@ -123,7 +123,7 @@ def test_objc_exceptions_at_throw(self):
         pcs = [i.unsigned for i in children]
         names = [target.ResolveSymbolContextForAddress(lldb.SBAddress(pc, target), lldb.eSymbolContextSymbol).GetSymbol().name for pc in pcs]
         for n in ["objc_exception_throw", "foo(int)", "main"]:
-            self.assertTrue(n in names, "%s is in the exception backtrace (%s)" % (n, names))
+            self.assertIn(n, names, "%s is in the exception backtrace (%s)" % (n, names))
 
     def test_objc_exceptions_at_abort(self):
         self.build()

diff  --git a/lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py b/lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
index 16a34e043c91..054b4d7cfa5e 100644
--- a/lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
+++ b/lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
@@ -73,7 +73,7 @@ def test_objc_checker(self):
 
         # Make sure the error is helpful:
         err_string = expr_error.GetCString()
-        self.assertTrue("selector" in err_string)
+        self.assertIn("selector", err_string)
 
         #
         # Check that we correctly insert the checker for an

diff  --git a/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py b/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
index 520e92790bd2..534be5594051 100644
--- a/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
+++ b/lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py
@@ -31,7 +31,7 @@ def test_macabi(self):
     def check_debugserver(self, log):
         """scan the debugserver packet log"""
         process_info = lldbutil.packetlog_get_process_info(log)
-        self.assertTrue('ostype' in process_info)
+        self.assertIn('ostype', process_info)
         self.assertEquals(process_info['ostype'], 'maccatalyst')
 
         aout_info = None

diff  --git a/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py b/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
index 46c0efd9d526..d02707b581ef 100644
--- a/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
+++ b/lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py
@@ -34,7 +34,7 @@ def test(self):
     def check_debugserver(self, log):
         """scan the debugserver packet log"""
         process_info = lldbutil.packetlog_get_process_info(log)
-        self.assertTrue('ostype' in process_info)
+        self.assertIn('ostype', process_info)
         self.assertEquals(process_info['ostype'], 'maccatalyst')
 
         aout_info = None

diff  --git a/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py b/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
index 0262f5af5004..8a68f8e41096 100644
--- a/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
+++ b/lldb/test/API/macosx/simulator/TestSimulatorPlatform.py
@@ -29,7 +29,7 @@ def check_load_commands(self, expected_load_command):
     def check_debugserver(self, log, expected_platform, expected_version):
         """scan the debugserver packet log"""
         process_info = lldbutil.packetlog_get_process_info(log)
-        self.assertTrue('ostype' in process_info)
+        self.assertIn('ostype', process_info)
         self.assertEquals(process_info['ostype'], expected_platform)
         dylib_info = lldbutil.packetlog_get_dylib_info(log)
         self.assertTrue(dylib_info)

diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py
index a16ba6dc3443..9d0c9db3b950 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py
@@ -35,7 +35,7 @@ def get_raw_auxv_data(self):
 
         proc_info = self.parse_process_info_response(context)
         self.assertIsNotNone(proc_info)
-        self.assertTrue("ptrsize" in proc_info)
+        self.assertIn("ptrsize", proc_info)
         word_size = int(proc_info["ptrsize"])
 
         OFFSET = 0

diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
index fcf115647801..d6b9238156c5 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
@@ -54,7 +54,7 @@ def stop_notification_contains_generic_register(
         self.assertIsNotNone(reg_info)
 
         # Ensure the expedited registers contained it.
-        self.assertTrue(reg_info["lldb_register_index"] in expedited_registers)
+        self.assertIn(reg_info["lldb_register_index"], expedited_registers)
         self.trace("{} reg_info:{}".format(generic_register_name, reg_info))
 
     def test_stop_notification_contains_any_registers(self):
@@ -121,5 +121,5 @@ def test_stop_notification_contains_vg_register(self):
         self.assertIsNotNone(reg_info)
 
         # Ensure the expedited registers contained it.
-        self.assertTrue(reg_info["lldb_register_index"] in expedited_registers)
+        self.assertIn(reg_info["lldb_register_index"], expedited_registers)
         self.trace("{} reg_info:{}".format('vg', reg_info))

diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py b/lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py
index 63126c15d471..6a4bdc1bb9c4 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py
@@ -66,8 +66,8 @@ def parse_host_info_response(self, context):
 
         # Validate keys are known.
         for (key, val) in list(host_info_dict.items()):
-            self.assertTrue(key in self.KNOWN_HOST_INFO_KEYS,
-                            "unknown qHostInfo key: " + key)
+            self.assertIn(key, self.KNOWN_HOST_INFO_KEYS,
+                          "unknown qHostInfo key: " + key)
             self.assertIsNotNone(val)
 
         # Return the key:val pairs.

diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemote_vCont.py b/lldb/test/API/tools/lldb-server/TestGdbRemote_vCont.py
index 6f12f8901666..3621a6a497a6 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemote_vCont.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemote_vCont.py
@@ -22,7 +22,7 @@ def vCont_supports_mode(self, mode, inferior_args=None):
         self.assertIsNotNone(supported_vCont_modes)
 
         # Verify we support the given mode.
-        self.assertTrue(mode in supported_vCont_modes)
+        self.assertIn(mode, supported_vCont_modes)
 
 
     def test_vCont_supports_c(self):

diff  --git a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
index e26a8210d254..d93dc48f3372 100644
--- a/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
+++ b/lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
@@ -158,17 +158,17 @@ def test_qRegisterInfo_contains_required_generics_debugserver(self):
             reg_info['generic']: 1 for reg_info in reg_infos if 'generic' in reg_info}
 
         # Ensure we have a program counter register.
-        self.assertTrue('pc' in generic_regs)
+        self.assertIn('pc', generic_regs)
 
         # Ensure we have a frame pointer register. PPC64le's FP is the same as SP
         if self.getArchitecture() != 'powerpc64le':
-            self.assertTrue('fp' in generic_regs)
+            self.assertIn('fp', generic_regs)
 
         # Ensure we have a stack pointer register.
-        self.assertTrue('sp' in generic_regs)
+        self.assertIn('sp', generic_regs)
 
         # Ensure we have a flags register.
-        self.assertTrue('flags' in generic_regs)
+        self.assertIn('flags', generic_regs)
 
     def test_qRegisterInfo_contains_at_least_one_register_set(self):
         self.build()
@@ -442,7 +442,7 @@ def Hc_then_Csignal_signals_correct_thread(self, segfault_signo):
 
             # Ensure we haven't seen this tid yet.
             thread_id = int(context.get("thread_id"), 16)
-            self.assertFalse(thread_id in signaled_tids)
+            self.assertNotIn(thread_id, signaled_tids)
             signaled_tids[thread_id] = 1
 
             # Send SIGUSR1 to the thread that signaled the SIGSEGV.
@@ -490,7 +490,7 @@ def Hc_then_Csignal_signals_correct_thread(self, segfault_signo):
             print_thread_id = context.get("print_thread_id")
             self.assertIsNotNone(print_thread_id)
             print_thread_id = int(print_thread_id, 16)
-            self.assertFalse(print_thread_id in print_thread_ids)
+            self.assertNotIn(print_thread_id, print_thread_ids)
 
             # Now remember this print (i.e. inferior-reflected) thread id and
             # ensure we don't hit it again.
@@ -629,12 +629,12 @@ def test_qMemoryRegionInfo_reports_code_address_as_executable(self):
         mem_region_dict = self.parse_memory_region_packet(context)
 
         # Ensure there are no errors reported.
-        self.assertFalse("error" in mem_region_dict)
+        self.assertNotIn("error", mem_region_dict)
 
         # Ensure code address is readable and executable.
-        self.assertTrue("permissions" in mem_region_dict)
-        self.assertTrue("r" in mem_region_dict["permissions"])
-        self.assertTrue("x" in mem_region_dict["permissions"])
+        self.assertIn("permissions", mem_region_dict)
+        self.assertIn("r", mem_region_dict["permissions"])
+        self.assertIn("x", mem_region_dict["permissions"])
 
         # Ensure the start address and size encompass the address we queried.
         self.assert_address_within_memory_region(code_address, mem_region_dict)
@@ -681,12 +681,12 @@ def test_qMemoryRegionInfo_reports_stack_address_as_rw(self):
         mem_region_dict = self.parse_memory_region_packet(context)
 
         # Ensure there are no errors reported.
-        self.assertFalse("error" in mem_region_dict)
+        self.assertNotIn("error", mem_region_dict)
 
         # Ensure address is readable and executable.
-        self.assertTrue("permissions" in mem_region_dict)
-        self.assertTrue("r" in mem_region_dict["permissions"])
-        self.assertTrue("w" in mem_region_dict["permissions"])
+        self.assertIn("permissions", mem_region_dict)
+        self.assertIn("r", mem_region_dict["permissions"])
+        self.assertIn("w", mem_region_dict["permissions"])
 
         # Ensure the start address and size encompass the address we queried.
         self.assert_address_within_memory_region(
@@ -734,12 +734,12 @@ def test_qMemoryRegionInfo_reports_heap_address_as_rw(self):
         mem_region_dict = self.parse_memory_region_packet(context)
 
         # Ensure there are no errors reported.
-        self.assertFalse("error" in mem_region_dict)
+        self.assertNotIn("error", mem_region_dict)
 
         # Ensure address is readable and executable.
-        self.assertTrue("permissions" in mem_region_dict)
-        self.assertTrue("r" in mem_region_dict["permissions"])
-        self.assertTrue("w" in mem_region_dict["permissions"])
+        self.assertIn("permissions", mem_region_dict)
+        self.assertIn("r", mem_region_dict["permissions"])
+        self.assertIn("w", mem_region_dict["permissions"])
 
         # Ensure the start address and size encompass the address we queried.
         self.assert_address_within_memory_region(heap_address, mem_region_dict)

diff  --git a/lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py b/lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
index ef803bf8bb2a..2323d277a633 100644
--- a/lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
+++ b/lldb/test/API/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
@@ -127,7 +127,7 @@ def test_set_and_clear(self):
                 self.assertTrue(line, lines[index])
                 # Store the "id" of the breakpoint that was set for later
                 line_to_id[line] = breakpoint['id']
-                self.assertTrue(line in lines, "line expected in lines array")
+                self.assertIn(line, lines, "line expected in lines array")
                 self.assertTrue(breakpoint['verified'],
                                 "expect breakpoint verified")
 
@@ -153,7 +153,7 @@ def test_set_and_clear(self):
                 # making sure the breakpoint ID didn't change
                 self.assertEquals(line_to_id[line], breakpoint['id'],
                                 "verify previous breakpoints stayed the same")
-                self.assertTrue(line in lines, "line expected in lines array")
+                self.assertIn(line, lines, "line expected in lines array")
                 self.assertTrue(breakpoint['verified'],
                                 "expect breakpoint still verified")
 
@@ -172,7 +172,7 @@ def test_set_and_clear(self):
                 # making sure the breakpoint ID didn't change
                 self.assertEquals(line_to_id[line], breakpoint['id'],
                                 "verify previous breakpoints stayed the same")
-                self.assertTrue(line in lines, "line expected in lines array")
+                self.assertIn(line, lines, "line expected in lines array")
                 self.assertTrue(breakpoint['verified'],
                                 "expect breakpoint still verified")
 
@@ -202,7 +202,7 @@ def test_set_and_clear(self):
                             "expect %u source breakpoints" % (len(lines)))
             for breakpoint in breakpoints:
                 line = breakpoint['line']
-                self.assertTrue(line in lines, "line expected in lines array")
+                self.assertIn(line, lines, "line expected in lines array")
                 self.assertTrue(breakpoint['verified'],
                                 "expect breakpoint still verified")
 
@@ -217,7 +217,7 @@ def test_set_and_clear(self):
                             "expect %u source breakpoints" % (len(lines)))
             for breakpoint in breakpoints:
                 line = breakpoint['line']
-                self.assertTrue(line in lines, "line expected in lines array")
+                self.assertIn(line, lines, "line expected in lines array")
                 self.assertTrue(breakpoint['verified'],
                                 "expect breakpoint still verified")
 
@@ -248,7 +248,7 @@ def test_clear_breakpoints_unset_breakpoints(self):
             self.assertTrue(line, lines[index])
             # Store the "id" of the breakpoint that was set for later
             line_to_id[line] = breakpoint['id']
-            self.assertTrue(line in lines, "line expected in lines array")
+            self.assertIn(line, lines, "line expected in lines array")
             self.assertTrue(breakpoint['verified'],
                             "expect breakpoint verified")
 

diff  --git a/lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py b/lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py
index 9c71be9bf378..f36b8e24b453 100644
--- a/lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py
+++ b/lldb/test/API/tools/lldb-vscode/console/TestVSCode_console.py
@@ -19,10 +19,10 @@ class TestVSCode_console(lldbvscode_testcase.VSCodeTestCaseBase):
     def check_lldb_command(self, lldb_command, contains_string, assert_msg):
         response = self.vscode.request_evaluate('`%s' % (lldb_command))
         output = response['body']['result']
-        self.assertTrue(contains_string in output,
-                        ("""Verify %s by checking the command output:\n"""
-                         """'''\n%s'''\nfor the string: "%s" """ % (
-                         assert_msg, output, contains_string)))
+        self.assertIn(contains_string, output,
+                      ("""Verify %s by checking the command output:\n"""
+                       """'''\n%s'''\nfor the string: "%s" """ % (
+                       assert_msg, output, contains_string)))
 
     @skipIfWindows
     @skipIfRemote

diff  --git a/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py b/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
index 928a98216541..85837d51c497 100644
--- a/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
+++ b/lldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
@@ -33,8 +33,8 @@ def test_default(self):
         self.assertTrue(output and len(output) > 0,
                         "expect program output")
         lines = output.splitlines()
-        self.assertTrue(program in lines[0],
-                        "make sure program path is in first argument")
+        self.assertIn(program, lines[0],
+                      "make sure program path is in first argument")
 
     @skipIfWindows
     @skipIfRemote
@@ -104,9 +104,9 @@ def test_cwd(self):
             if line.startswith('cwd = \"'):
                 quote_path = '"%s"' % (program_parent_dir)
                 found = True
-                self.assertTrue(quote_path in line,
-                                "working directory '%s' not in '%s'" % (
-                                    program_parent_dir, line))
+                self.assertIn(quote_path, line,
+                              "working directory '%s' not in '%s'" % (
+                                  program_parent_dir, line))
         self.assertTrue(found, "verified program working directory")
 
     @skipIfWindows
@@ -202,9 +202,9 @@ def test_shellExpandArguments_enabled(self):
         for line in lines:
             quote_path = '"%s"' % (program)
             if line.startswith("arg[1] ="):
-                self.assertTrue(quote_path in line,
-                                'verify "%s" expanded to "%s"' % (
-                                    glob, program))
+                self.assertIn(quote_path, line,
+                              'verify "%s" expanded to "%s"' % (
+                                  glob, program))
 
     @skipIfWindows
     @skipIfRemote
@@ -228,9 +228,9 @@ def test_shellExpandArguments_disabled(self):
         for line in lines:
             quote_path = '"%s"' % (glob)
             if line.startswith("arg[1] ="):
-                self.assertTrue(quote_path in line,
-                                'verify "%s" stayed to "%s"' % (
-                                    glob, glob))
+                self.assertIn(quote_path, line,
+                              'verify "%s" stayed to "%s"' % (
+                                  glob, glob))
 
     @skipIfWindows
     @skipIfRemote
@@ -255,8 +255,8 @@ def test_args(self):
         # Make sure arguments we specified are correct
         for (i, arg) in enumerate(args):
             quoted_arg = '"%s"' % (arg)
-            self.assertTrue(quoted_arg in lines[i],
-                            'arg[%i] "%s" not in "%s"' % (i+1, quoted_arg, lines[i]))
+            self.assertIn(quoted_arg, lines[i],
+                          'arg[%i] "%s" not in "%s"' % (i+1, quoted_arg, lines[i]))
 
     @skipIfWindows
     @skipIfRemote

diff  --git a/lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py b/lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
index 4022f420ef72..491261b3a29b 100644
--- a/lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
+++ b/lldb/test/API/tools/lldb-vscode/module/TestVSCode_module.py
@@ -31,7 +31,7 @@ def run_test(self, symbol_basename, expect_debug_info_size):
         self.assertEqual(program_basename, program_module['name'])
         self.assertIn('path', program_module, 'make sure path is in module')
         self.assertEqual(program, program_module['path'])
-        self.assertTrue('symbolFilePath' not in program_module, 'Make sure a.out.stripped has no debug info')
+        self.assertNotIn('symbolFilePath', program_module, 'Make sure a.out.stripped has no debug info')
         symbols_path = self.getBuildArtifact(symbol_basename)
         self.vscode.request_evaluate('`%s' % ('target symbols add -s "%s" "%s"' % (program, symbols_path)))
 

diff  --git a/lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py b/lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py
index 20f9e63e3607..12fa3e1d3057 100644
--- a/lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py
+++ b/lldb/test/API/tools/lldb-vscode/variables/TestVSCode_variables.py
@@ -69,8 +69,8 @@ def verify_values(self, verify_dict, actual, varref_dict=None):
     def verify_variables(self, verify_dict, variables, varref_dict=None):
         for variable in variables:
             name = variable['name']
-            self.assertTrue(name in verify_dict,
-                            'variable "%s" in verify dictionary' % (name))
+            self.assertIn(name, verify_dict,
+                          'variable "%s" in verify dictionary' % (name))
             self.verify_values(verify_dict[name], variable, varref_dict)
 
     @skipIfWindows


        


More information about the lldb-commits mailing list