llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) <details> <summary>Changes</summary> assertEquals is a deprecated alias for assertEqual and has been removed in Python 3.12. This wasn't an issue previously because we used a vendored version of the unittest module. Now that we use the built-in version this gets updated together with the Python version used to run the test suite. --- Patch is 165.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/82073.diff 111 Files Affected: - (modified) lldb/packages/Python/lldbsuite/test/lldbutil.py (+6-6) - (modified) lldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py (+1-1) - (modified) lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py (+4-4) - (modified) lldb/test/API/commands/expression/call-throws/TestCallThatThrows.py (+2-2) - (modified) lldb/test/API/commands/expression/completion/TestExprCompletion.py (+1-1) - (modified) lldb/test/API/commands/expression/fixits/TestFixIts.py (+5-5) - (modified) lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py (+1-1) - (modified) lldb/test/API/commands/expression/test/TestExprs.py (+4-4) - (modified) lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py (+2-2) - (modified) lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py (+1-1) - (modified) lldb/test/API/commands/frame/language/TestGuessLanguage.py (+1-1) - (modified) lldb/test/API/commands/frame/var/TestFrameVar.py (+1-1) - (modified) lldb/test/API/commands/log/basic/TestLogging.py (+2-2) - (modified) lldb/test/API/commands/memory/read/TestMemoryRead.py (+2-2) - (modified) lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py (+5-5) - (modified) lldb/test/API/driver/job_control/TestJobControl.py (+1-1) - (modified) lldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py (+2-2) - (modified) lldb/test/API/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py (+1-1) - (modified) lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py (+7-7) - (modified) lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py (+7-7) - (modified) lldb/test/API/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py (+3-3) - (modified) lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py (+1-1) - (modified) lldb/test/API/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py (+5-5) - (modified) lldb/test/API/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py (+4-4) - (modified) lldb/test/API/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py (+4-4) - (modified) lldb/test/API/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py (+2-2) - (modified) lldb/test/API/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py (+1-1) - (modified) lldb/test/API/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py (+7-7) - (modified) lldb/test/API/functionalities/breakpoint/thread_plan_user_breakpoint/TestThreadPlanUserBreakpoint.py (+2-2) - (modified) lldb/test/API/functionalities/data-formatter/format-propagation/TestFormatPropagation.py (+7-7) - (modified) lldb/test/API/functionalities/diagnostic_reporting/TestDiagnosticReporting.py (+2-2) - (modified) lldb/test/API/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py (+2-2) - (modified) lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py (+6-6) - (modified) lldb/test/API/functionalities/gdb_remote_client/TestGdbClientModuleLoad.py (+1-1) - (modified) lldb/test/API/functionalities/gdb_remote_client/TestWasm.py (+36-36) - (modified) lldb/test/API/functionalities/gdb_remote_client/TestqOffsets.py (+2-2) - (modified) lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py (+1-1) - (modified) lldb/test/API/functionalities/load_lazy/TestLoadUsingLazyBind.py (+1-1) - (modified) lldb/test/API/functionalities/memory/cache/TestMemoryCache.py (+2-2) - (modified) lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py (+1-1) - (modified) lldb/test/API/functionalities/process_group/TestChangeProcessGroup.py (+1-1) - (modified) lldb/test/API/functionalities/return-value/TestReturnValue.py (+11-11) - (modified) lldb/test/API/functionalities/signal/TestSendSignal.py (+2-2) - (modified) lldb/test/API/functionalities/source-map/TestTargetSourceMap.py (+7-7) - (modified) lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py (+1-1) - (modified) lldb/test/API/functionalities/tail_call_frames/unambiguous_sequence/main.cpp (+1-1) - (modified) lldb/test/API/functionalities/thread/main_thread_exit/TestMainThreadExit.py (+1-1) - (modified) lldb/test/API/functionalities/ubsan/basic/TestUbsanBasic.py (+1-1) - (modified) lldb/test/API/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py (+1-1) - (modified) lldb/test/API/functionalities/value_md5_crash/TestValueMD5Crash.py (+1-1) - (modified) lldb/test/API/functionalities/var_path/TestVarPath.py (+5-5) - (modified) lldb/test/API/functionalities/vtable/TestVTableValue.py (+26-26) - (modified) lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py (+2-2) - (modified) lldb/test/API/lang/c/array_types/TestArrayTypes.py (+9-9) - (modified) lldb/test/API/lang/cpp/dynamic-value/TestDynamicValue.py (+9-9) - (modified) lldb/test/API/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py (+1-1) - (modified) lldb/test/API/lang/cpp/incomplete-types/members/TestCppIncompleteTypeMembers.py (+1-1) - (modified) lldb/test/API/lang/cpp/template-specialization-type/TestTemplateSpecializationType.py (+6-6) - (modified) lldb/test/API/lang/cpp/template/TestTemplateArgs.py (+13-13) - (modified) lldb/test/API/lang/objc/global_ptrs/TestGlobalObjects.py (+1-1) - (modified) lldb/test/API/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py (+1-1) - (modified) lldb/test/API/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py (+5-5) - (modified) lldb/test/API/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py (+4-4) - (modified) lldb/test/API/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py (+2-2) - (modified) lldb/test/API/lang/objc/objc-property/TestObjCProperty.py (+7-7) - (modified) lldb/test/API/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py (+1-1) - (modified) lldb/test/API/lang/objc/objc-static-method/TestObjCStaticMethod.py (+1-1) - (modified) lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py (+1-1) - (modified) lldb/test/API/lang/objc/objc-struct-return/TestObjCStructReturn.py (+1-1) - (modified) lldb/test/API/lang/objc/objc-super/TestObjCSuper.py (+3-3) - (modified) lldb/test/API/lang/objcxx/objc-builtin-types/TestObjCBuiltinTypes.py (+1-1) - (modified) lldb/test/API/lua_api/TestBreakpointAPI.lua (+3-3) - (modified) lldb/test/API/lua_api/TestComprehensive.lua (+3-3) - (modified) lldb/test/API/lua_api/TestFileHandle.lua (+1-1) - (modified) lldb/test/API/lua_api/TestProcessAPI.lua (+2-2) - (modified) lldb/test/API/lua_api/lua_lldb_test.lua (+4-4) - (modified) lldb/test/API/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py (+1-1) - (modified) lldb/test/API/macosx/find-dsym/deep-bundle/TestDeepBundle.py (+1-1) - (modified) lldb/test/API/macosx/macCatalyst/TestMacCatalyst.py (+2-2) - (modified) lldb/test/API/macosx/macCatalystAppMacOSFramework/TestMacCatalystAppWithMacOSFramework.py (+3-3) - (modified) lldb/test/API/macosx/simulator/TestSimulatorPlatform.py (+4-4) - (modified) lldb/test/API/macosx/thread-names/TestInterruptThreadNames.py (+1-1) - (modified) lldb/test/API/macosx/universal/TestUniversal.py (+1-1) - (modified) lldb/test/API/python_api/class_members/TestSBTypeClassMembers.py (+25-25) - (modified) lldb/test/API/python_api/debugger/TestDebuggerAPI.py (+1-1) - (modified) lldb/test/API/python_api/findvalue_duplist/TestSBFrameFindValue.py (+1-1) - (modified) lldb/test/API/python_api/interpreter/TestCommandInterpreterAPI.py (+2-2) - (modified) lldb/test/API/python_api/name_lookup/TestNameLookup.py (+1-1) - (modified) lldb/test/API/python_api/objc_type/TestObjCType.py (+2-2) - (modified) lldb/test/API/python_api/sblaunchinfo/TestSBLaunchInfo.py (+4-4) - (modified) lldb/test/API/python_api/sbvalue_persist/TestSBValuePersist.py (+2-2) - (modified) lldb/test/API/python_api/type/TestTypeList.py (+2-2) - (modified) lldb/test/API/python_api/value/change_values/TestChangeValueAPI.py (+5-5) - (modified) lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_logpoints.py (+4-4) - (modified) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setBreakpoints.py (+20-20) - (modified) lldb/test/API/tools/lldb-dap/breakpoint/TestDAP_setFunctionBreakpoints.py (+15-15) - (modified) lldb/test/API/tools/lldb-dap/coreFile/TestDAP_coreFile.py (+3-3) - (modified) lldb/test/API/tools/lldb-dap/launch/TestDAP_launch.py (+4-4) - (modified) lldb/test/API/tools/lldb-dap/module/TestDAP_module.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/restart/TestDAP_restart.py (+4-4) - (modified) lldb/test/API/tools/lldb-dap/restart/TestDAP_restart_runInTerminal.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/stackTrace/TestDAP_stackTrace.py (+15-15) - (modified) lldb/test/API/tools/lldb-dap/stackTraceMissingFunctionName/TestDAP_stackTraceMissingFunctionName.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/terminated-event/TestDAP_terminatedEvent.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/threads/TestDAP_threads.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py (+3-3) - (modified) lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py (+2-2) - (modified) lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py (+1-1) - (modified) lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py (+1-1) - (modified) lldb/test/API/tools/lldb-server/TestLldbGdbServer.py (+2-2) ``````````diff diff --git a/lldb/packages/Python/lldbsuite/test/lldbutil.py b/lldb/packages/Python/lldbsuite/test/lldbutil.py index 506c213639e092..58eb37fd742d73 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbutil.py +++ b/lldb/packages/Python/lldbsuite/test/lldbutil.py @@ -696,24 +696,24 @@ def check_breakpoint( test.assertTrue(bkpt.IsValid(), "Breakpoint is not valid.") if expected_locations is not None: - test.assertEquals(expected_locations, bkpt.GetNumLocations()) + test.assertEqual(expected_locations, bkpt.GetNumLocations()) if expected_resolved_count is not None: - test.assertEquals(expected_resolved_count, bkpt.GetNumResolvedLocations()) + test.assertEqual(expected_resolved_count, bkpt.GetNumResolvedLocations()) else: expected_resolved_count = bkpt.GetNumLocations() if location_id is None: - test.assertEquals(expected_resolved_count, bkpt.GetNumResolvedLocations()) + test.assertEqual(expected_resolved_count, bkpt.GetNumResolvedLocations()) if expected_hit_count is not None: - test.assertEquals(expected_hit_count, bkpt.GetHitCount()) + test.assertEqual(expected_hit_count, bkpt.GetHitCount()) if location_id is not None: loc_bkpt = bkpt.FindLocationByID(location_id) test.assertTrue(loc_bkpt.IsValid(), "Breakpoint location is not valid.") - test.assertEquals(loc_bkpt.IsResolved(), expected_location_resolved) + test.assertEqual(loc_bkpt.IsResolved(), expected_location_resolved) if expected_location_hit_count is not None: - test.assertEquals(expected_location_hit_count, loc_bkpt.GetHitCount()) + test.assertEqual(expected_location_hit_count, loc_bkpt.GetHitCount()) # ================================================== diff --git a/lldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py b/lldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py index 0fd56a069d8940..0d324918d0658b 100644 --- a/lldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py +++ b/lldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py @@ -48,7 +48,7 @@ def frame_disassemble_test(self): ) # The hit count for the breakpoint should be 1. - self.assertEquals(breakpoint.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 1) frame = threads[0].GetFrameAtIndex(0) disassembly = frame.Disassemble() diff --git a/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py b/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py index 220cd88bf194ec..214d890db3fe34 100644 --- a/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py +++ b/lldb/test/API/commands/expression/call-restarts/TestCallThatRestarts.py @@ -75,7 +75,7 @@ def call_function(self): value = frame.EvaluateExpression("call_me (%d)" % (num_sigchld), options) self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsSigned(-1), num_sigchld) + self.assertEqual(value.GetValueAsSigned(-1), num_sigchld) self.check_after_call(num_sigchld) @@ -92,7 +92,7 @@ def call_function(self): self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsSigned(-1), num_sigchld) + self.assertEqual(value.GetValueAsSigned(-1), num_sigchld) self.check_after_call(num_sigchld) # Now set the signal to print but not stop and make sure that calling @@ -103,7 +103,7 @@ def call_function(self): self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsSigned(-1), num_sigchld) + self.assertEqual(value.GetValueAsSigned(-1), num_sigchld) self.check_after_call(num_sigchld) # Now set this unwind on error to false, and make sure that we still @@ -113,7 +113,7 @@ def call_function(self): self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsSigned(-1), num_sigchld) + self.assertEqual(value.GetValueAsSigned(-1), num_sigchld) self.check_after_call(num_sigchld) # Okay, now set UnwindOnError to true, and then make the signal behavior to stop diff --git a/lldb/test/API/commands/expression/call-throws/TestCallThatThrows.py b/lldb/test/API/commands/expression/call-throws/TestCallThatThrows.py index 9dce2529def019..8d524ad9e9b6fb 100644 --- a/lldb/test/API/commands/expression/call-throws/TestCallThatThrows.py +++ b/lldb/test/API/commands/expression/call-throws/TestCallThatThrows.py @@ -46,7 +46,7 @@ def call_function(self): value = frame.EvaluateExpression("[my_class callMeIThrow]", options) self.assertTrue(value.IsValid()) - self.assertEquals(value.GetError().Success(), False) + self.assertEqual(value.GetError().Success(), False) self.check_after_call() @@ -86,7 +86,7 @@ def call_function(self): value = frame.EvaluateExpression("[my_class iCatchMyself]", options) self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsUnsigned(), 57) + self.assertEqual(value.GetValueAsUnsigned(), 57) self.check_after_call() options.SetTrapExceptions(True) diff --git a/lldb/test/API/commands/expression/completion/TestExprCompletion.py b/lldb/test/API/commands/expression/completion/TestExprCompletion.py index ada818989c789a..c6a1e3c0f42275 100644 --- a/lldb/test/API/commands/expression/completion/TestExprCompletion.py +++ b/lldb/test/API/commands/expression/completion/TestExprCompletion.py @@ -305,7 +305,7 @@ def assume_no_completions(self, str_input, cursor_pos=None): for m in match_strings: available_completions.append(m) - self.assertEquals( + self.assertEqual( num_matches, 0, "Got matches, but didn't expect any: " + str(available_completions), diff --git a/lldb/test/API/commands/expression/fixits/TestFixIts.py b/lldb/test/API/commands/expression/fixits/TestFixIts.py index 38b242838c828f..3289bc0c5c7e03 100644 --- a/lldb/test/API/commands/expression/fixits/TestFixIts.py +++ b/lldb/test/API/commands/expression/fixits/TestFixIts.py @@ -46,7 +46,7 @@ def test_with_target(self): value = frame.EvaluateExpression("my_pointer.first", options) self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsUnsigned(), 10) + self.assertEqual(value.GetValueAsUnsigned(), 10) # Try with one error in a top-level expression. # The Fix-It changes "ptr.m" to "ptr->m". @@ -56,14 +56,14 @@ def test_with_target(self): # unknown error . If a parsing error would have happened we # would get a different error kind, so let's check the error # kind here. - self.assertEquals(value.GetError().GetCString(), "unknown error") + self.assertEqual(value.GetError().GetCString(), "unknown error") # Try with two errors: two_error_expression = "my_pointer.second->a" value = frame.EvaluateExpression(two_error_expression, options) self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetValueAsUnsigned(), 20) + self.assertEqual(value.GetValueAsUnsigned(), 20) # Try a Fix-It that is stored in the 'note:' diagnostic of an error. # The Fix-It here is adding parantheses around the ToStr parameters. @@ -71,7 +71,7 @@ def test_with_target(self): value = frame.EvaluateExpression(fixit_in_note_expr, options) self.assertTrue(value.IsValid()) self.assertSuccess(value.GetError()) - self.assertEquals(value.GetSummary(), '"(0 {, })"') + self.assertEqual(value.GetSummary(), '"(0 {, })"') # Now turn off the fixits, and the expression should fail: options.SetAutoApplyFixIts(False) @@ -178,7 +178,7 @@ def test_with_multiple_retries(self): multiple_runs_options.SetRetriesWithFixIts(2) value = frame.EvaluateExpression(two_runs_expr, multiple_runs_options) # This error signals success for top level expressions. - self.assertEquals(value.GetError().GetCString(), "unknown error") + self.assertEqual(value.GetError().GetCString(), "unknown error") # Test that the code above compiles to the right thing. self.expect_expr("test_X(1)", result_type="int", result_value="123") diff --git a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py index 438b92cdc48462..aa125253763fdd 100644 --- a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py +++ b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py @@ -37,7 +37,7 @@ def test_save_jit_objects(self): self.cleanJITFiles() frame.EvaluateExpression("(void*)malloc(0x1)") - self.assertEquals( + self.assertEqual( self.countJITFiles(), 0, "No files emitted with save-jit-objects-dir empty" ) diff --git a/lldb/test/API/commands/expression/test/TestExprs.py b/lldb/test/API/commands/expression/test/TestExprs.py index 0e3d2e6cf41ffb..0e3215522ea6e8 100644 --- a/lldb/test/API/commands/expression/test/TestExprs.py +++ b/lldb/test/API/commands/expression/test/TestExprs.py @@ -124,7 +124,7 @@ def test_evaluate_expression_python(self): ) # We should be stopped on the breakpoint with a hit count of 1. - self.assertEquals(breakpoint.GetHitCount(), 1, BREAKPOINT_HIT_ONCE) + self.assertEqual(breakpoint.GetHitCount(), 1, BREAKPOINT_HIT_ONCE) # # Use Python API to evaluate expressions while stopped in a stack frame. @@ -169,15 +169,15 @@ def test_evaluate_expression_python(self): self.expect( "expression -i true -- a_function_to_call()", substrs=["(int) $", " 1"] ) - self.assertEquals(callee_break.GetHitCount(), 1) + self.assertEqual(callee_break.GetHitCount(), 1) # Now try ignoring breakpoints using the SB API's: options = lldb.SBExpressionOptions() options.SetIgnoreBreakpoints(True) value = frame.EvaluateExpression("a_function_to_call()", options) self.assertTrue(value.IsValid()) - self.assertEquals(value.GetValueAsSigned(0), 2) - self.assertEquals(callee_break.GetHitCount(), 2) + self.assertEqual(value.GetValueAsSigned(0), 2) + self.assertEqual(callee_break.GetHitCount(), 2) # rdar://problem/8686536 # CommandInterpreter::HandleCommand is stripping \'s from input for diff --git a/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py b/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py index dc3d175b695b6b..2c48024c698337 100644 --- a/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py +++ b/lldb/test/API/commands/expression/timeout/TestCallWithTimeout.py @@ -46,7 +46,7 @@ def test(self): return_value = interp.HandleCommand( "expr -t 100 -u true -- wait_a_while(1000000)", result ) - self.assertEquals(return_value, lldb.eReturnStatusFailed) + self.assertEqual(return_value, lldb.eReturnStatusFailed) # Okay, now do it again with long enough time outs: @@ -63,7 +63,7 @@ def test(self): return_value = interp.HandleCommand( "expr -t 1000000 -u true -- wait_a_while(1000)", result ) - self.assertEquals(return_value, lldb.eReturnStatusSuccessFinishResult) + self.assertEqual(return_value, lldb.eReturnStatusSuccessFinishResult) # Finally set the one thread timeout and make sure that doesn't change # things much: diff --git a/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py b/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py index ca2ba37f883872..bb173c0584a46e 100644 --- a/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py +++ b/lldb/test/API/commands/expression/unwind_expression/TestUnwindExpression.py @@ -42,7 +42,7 @@ def test_conditional_bktp(self): main_frame = self.thread.GetFrameAtIndex(0) val = main_frame.EvaluateExpression("second_function(47)", options) self.assertSuccess(val.GetError(), "We did complete the execution.") - self.assertEquals(47, val.GetValueAsSigned()) + self.assertEqual(47, val.GetValueAsSigned()) @add_test_categories(["pyapi"]) @expectedFlakeyNetBSD diff --git a/lldb/test/API/commands/frame/language/TestGuessLanguage.py b/lldb/test/API/commands/frame/language/TestGuessLanguage.py index e2912d3bf17312..dbf581ed7a12d9 100644 --- a/lldb/test/API/commands/frame/language/TestGuessLanguage.py +++ b/lldb/test/API/commands/frame/language/TestGuessLanguage.py @@ -59,7 +59,7 @@ def do_test(self): ) # The hit count for the breakpoint should be 1. - self.assertEquals(breakpoint.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 1) thread = threads[0] diff --git a/lldb/test/API/commands/frame/var/TestFrameVar.py b/lldb/test/API/commands/frame/var/TestFrameVar.py index c43121abfe4325..92e47eb45f5ca5 100644 --- a/lldb/test/API/commands/frame/var/TestFrameVar.py +++ b/lldb/test/API/commands/frame/var/TestFrameVar.py @@ -52,7 +52,7 @@ def do_test(self): ) # The hit count for the breakpoint should be 1. - self.assertEquals(breakpoint.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 1) frame = threads[0].GetFrameAtIndex(0) command_result = lldb.SBCommandReturnObject() diff --git a/lldb/test/API/commands/log/basic/TestLogging.py b/lldb/test/API/commands/log/basic/TestLogging.py index 52d86a1f81aece..daa32dc85753dc 100644 --- a/lldb/test/API/commands/log/basic/TestLogging.py +++ b/lldb/test/API/commands/log/basic/TestLogging.py @@ -62,7 +62,7 @@ def test_log_truncate(self): contents = f.read() # check that it got removed - self.assertEquals(contents.find("bacon"), -1) + self.assertEqual(contents.find("bacon"), -1) # Check that lldb can append to a log file def test_log_append(self): @@ -79,7 +79,7 @@ def test_log_append(self): contents = f.read() # check that it is still there - self.assertEquals(contents.find("bacon"), 0) + self.assertEqual(contents.find("bacon"), 0) # Enable all log options and check that nothing crashes. @skipIfWindows diff --git a/lldb/test/API/commands/memory/read/TestMemoryRead.py b/lldb/test/API/commands/memory/read/TestMemoryRead.py index cd7ad1bedc7067..67b28ee79067b2 100644 --- a/lldb/test/API/commands/memory/read/TestMemoryRead.py +++ b/lldb/test/API/commands/memory/read/TestMemoryRead.py @@ -57,7 +57,7 @@ def test_memory_read(self): address = int(items[0], 0) argc = int(items[1], 0) self.assertGreater(address, 0) - self.assertEquals(argc, 1) + self.assertEqual(argc, 1) # (lldb) memory read --format uint32_t[] --size 4 --count 4 `&argc` # 0x7fff5fbff9a0: {0x00000001} @@ -130,7 +130,7 @@ def test_memory_read(self): # Check that we got back 4 0x0000 etc bytes for o in objects_read: self.assertEqual(len(o), expected_object_length) - self.assertEquals(len(objects_read), 4) + self.assertEqual(len(objects_read), 4) def test_memory_read_file(self): self.build_run_stop() diff --git a/lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py b/lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py index 02f0592f40de6d..cde218c783f12d 100644 --- a/lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py +++ b/lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py @@ -53,11 +53,11 @@ def test_step_over_read_watchpoint(self): lldb.eStopReasonWatchpoint, STOPPED_DUE_TO_WATCHPOINT, ) - self.assertEquals(thread.GetStopDescription(20), "watchpoint 1") + self.assertEqual(thread.GetStopDescription(20), "watchpoint 1") process.Continue() self.assertState(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED) - self.assertEquals(thread.GetStopDescription(20), "step over") + self.assertEqual(thread.GetStopDescription(20), "step over") self.step_inst_for_watchpoint(1) @@ -95,11 +95,11 @@ def test_step_over_write_watchpoint(self): lldb.eStopReasonWatchpoint, STOPPED_DUE_TO_WATCHPOINT, ) - self.assertEquals(thread.GetStopDescription(20), "watchpoint 1") + self.assertEqual(thread.GetStopDescription(20), "watchpoint 1") process.Continue() self.assertState(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED) - self.assertEquals(thread.GetStopDescription(20), "step over") + self.assertEqual(thread.GetStopDescription(20), "step over") self.step_inst_for_watchpoint(1) @@ -113,7 +113,7 @@ def step_inst_for_watchpoint(self, wp_id): self.assertFalse(watchpoint_hit, "Watchpoint already hit.") expected_stop_desc = "watchpoint %d" % wp_id actual_stop_desc = self.thread().GetStopDescription(20) - self.assertEquals( + self.assertEqual( actual_stop_desc, expected_stop_desc, "Watchpoint ID didn't match." ) watchpoint_hit = True diff --git a/lldb/test/API/driver/job_control/TestJobControl.py b/lldb/test/API/driver/job_control/TestJobControl.py index 632f5ef2b8654f..1a1739f4cb391d 100644 --- a/lldb/test/API/driver/job_control/TestJobControl.py +++ b/lldb/test/API/driver/job_control/TestJobControl.py @@ -22,7 +22,7 @@ def post_spawn(): status = int(self.child.match[1]) self.assertTrue(os.WIFSTOPPED(status)) - self.assertEquals(os.WSTOPSIG(status), signal.SIGTSTP) + self.assertEqual(os.WSTOPSIG(status), signal.SIGTSTP) os.kill(self.lldb_pid, signal.SIGCONT) diff --git a/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py b/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py index 04272ad56e4781..3ceccc6e6d6416 100644 --- a/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py +++ b/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py @@ -64,7 +64,7 @@ def address_breakpoints(self): ) # The hit count for the breakpoint should be 1. - self.assertEquals(breakpoint.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 1) process.Kill() @@ -82,4 +82,4 @@ def address_breakpoints(self): # The hit count for the breakpoint should be 1, since we reset counts # for each run. - self.assertEquals(breakpoint.GetHitCount(), 1) + self.assertEqual(breakpoint.GetHitCount(), 1) diff --git a/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py b/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py index 1b44a6183c9826..0ab11a427c1009 100644 --- a/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py +++ b/lldb/test/API/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py @@ -40,7 +40,7 @@ def address_breakpoints(self): bkpt = target.BreakpointCreateByAddress(illegal_address) # Verify that breakpoint is not resolved. for bp_loc in bkpt: - self.assertEquals(bp_loc.IsResolved(), False) + self.assertEqual(bp_loc.IsResolved(), False) else: self.fail( "Could not find an illegal address at which to set a bad breakpo... [truncated] `````````` </details> https://github.com/llvm/llvm-project/pull/82073 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits