Author: zturner Date: Mon Oct 26 11:50:39 2015 New Revision: 251303 URL: http://llvm.org/viewvc/llvm-project?rev=251303&view=rev Log: Convert deprecated unittest method names.
Plural methods were long deprecated, and in Python 3 they are gone. Convert to the actual supported method names. Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py lldb/trunk/test/python_api/section/TestSectionAPI.py lldb/trunk/test/python_api/target/TestTargetAPI.py lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py Modified: lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py (original) +++ lldb/trunk/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py Mon Oct 26 11:50:39 2015 @@ -35,7 +35,7 @@ class LibcxxListDataFormatterTestCase(Te process = target.LaunchSimple(None, None, self.get_process_working_directory()) lldbutil.skip_if_library_missing(self, target, lldbutil.PrintableRegex("libc\+\+")) self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID) - self.assertEquals(len(lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint1)), 1) + self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint1)), 1) # verify our list is displayed correctly self.expect("frame variable *numbers_list", substrs=['[0] = 1', '[1] = 2', '[2] = 3', '[3] = 4', '[5] = 6']) @@ -43,7 +43,7 @@ class LibcxxListDataFormatterTestCase(Te # Continue to breakpoint 2. process.Continue() self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID) - self.assertEquals(len(lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint2)), 1) + self.assertEqual(len(lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint2)), 1) # The list is now inconsistent. However, we should be able to get the first three # elements at least (and most importantly, not crash). Modified: lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py (original) +++ lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py Mon Oct 26 11:50:39 2015 @@ -43,7 +43,7 @@ class ChangedInferiorTestCase(TestBase): self.runCmd("run", RUN_SUCCEEDED) # We should have one crashing thread - self.assertEquals( + self.assertEqual( len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())), 1, STOPPED_DUE_TO_EXC_BAD_ACCESS) @@ -60,7 +60,7 @@ class ChangedInferiorTestCase(TestBase): self.runCmd("run", RUN_SUCCEEDED) self.runCmd("process status") - self.assertNotEquals( + self.assertNotEqual( len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())), 1, "Inferior changed, but lldb did not perform a reload") Modified: lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py (original) +++ lldb/trunk/test/functionalities/inferior-crashing/TestInferiorCrashing.py Mon Oct 26 11:50:39 2015 @@ -65,7 +65,7 @@ class CrashingInferiorTestCase(TestBase) def check_stop_reason(self): # We should have one crashing thread - self.assertEquals( + self.assertEqual( len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())), 1, STOPPED_DUE_TO_EXC_BAD_ACCESS) Modified: lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py (original) +++ lldb/trunk/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py Mon Oct 26 11:50:39 2015 @@ -66,7 +66,7 @@ class CrashingRecursiveInferiorTestCase( def check_stop_reason(self): # We should have one crashing thread - self.assertEquals( + self.assertEqual( len(lldbutil.get_crashed_threads(self, self.dbg.GetSelectedTarget().GetProcess())), 1, STOPPED_DUE_TO_EXC_BAD_ACCESS) Modified: lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py (original) +++ lldb/trunk/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py Mon Oct 26 11:50:39 2015 @@ -40,7 +40,7 @@ class CreateDuringInstructionStepTestCas self.assertEqual(process.GetState(), lldb.eStateStopped, PROCESS_STOPPED) threads = lldbutil.get_threads_stopped_at_breakpoint(process, breakpoint) - self.assertEquals(len(threads), 1, STOPPED_DUE_TO_BREAKPOINT) + self.assertEqual(len(threads), 1, STOPPED_DUE_TO_BREAKPOINT) thread = threads[0] self.assertTrue(thread and thread.IsValid(), "Thread is valid") Modified: lldb/trunk/test/python_api/section/TestSectionAPI.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/section/TestSectionAPI.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/python_api/section/TestSectionAPI.py (original) +++ lldb/trunk/test/python_api/section/TestSectionAPI.py Mon Oct 26 11:50:39 2015 @@ -38,4 +38,4 @@ class SectionAPITestCase(TestBase): break self.assertIsNotNone(data_section) - self.assertEquals(data_section.target_byte_size, 1) + self.assertEqual(data_section.target_byte_size, 1) Modified: lldb/trunk/test/python_api/target/TestTargetAPI.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/target/TestTargetAPI.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/python_api/target/TestTargetAPI.py (original) +++ lldb/trunk/test/python_api/target/TestTargetAPI.py Mon Oct 26 11:50:39 2015 @@ -81,7 +81,7 @@ class TargetAPITestCase(TestBase): self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) target = self.create_simple_target('b.out') - self.assertEquals(target.data_byte_size, 1) + self.assertEqual(target.data_byte_size, 1) @add_test_categories(['pyapi']) def test_get_code_byte_size(self): @@ -89,7 +89,7 @@ class TargetAPITestCase(TestBase): self.build(dictionary=d) self.setTearDownCleanup(dictionary=d) target = self.create_simple_target('b.out') - self.assertEquals(target.code_byte_size, 1) + self.assertEqual(target.code_byte_size, 1) @add_test_categories(['pyapi']) def test_resolve_file_address(self): @@ -108,11 +108,11 @@ class TargetAPITestCase(TestBase): res_file_addr = target.ResolveFileAddress(data_section_addr) self.assertTrue(res_file_addr.IsValid()) - self.assertEquals(data_section_addr, res_file_addr.file_addr) + self.assertEqual(data_section_addr, res_file_addr.file_addr) data_section2 = res_file_addr.section self.assertIsNotNone(data_section2) - self.assertEquals(data_section.name, data_section2.name) + self.assertEqual(data_section.name, data_section2.name) @add_test_categories(['pyapi']) def test_read_memory(self): @@ -138,7 +138,7 @@ class TargetAPITestCase(TestBase): error = lldb.SBError() content = target.ReadMemory(sb_addr, 1, error) self.assertTrue(error.Success(), "Make sure memory read succeeded") - self.assertEquals(len(content), 1) + self.assertEqual(len(content), 1) def create_simple_target(self, fn): exe = os.path.join(os.getcwd(), fn) Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py (original) +++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py Mon Oct 26 11:50:39 2015 @@ -68,7 +68,7 @@ class TestGdbRemoteAuxvSupport(gdbremote # Ensure we end up with all auxv data in one packet. # FIXME don't assume it all comes back in one packet. - self.assertEquals(context.get("response_type"), "l") + self.assertEqual(context.get("response_type"), "l") # Decode binary data. content_raw = context.get("content_raw") @@ -100,7 +100,7 @@ class TestGdbRemoteAuxvSupport(gdbremote self.assertIsNotNone(auxv_data) # Ensure auxv data is a multiple of 2*word_size (there should be two unsigned long fields per auxv entry). - self.assertEquals(len(auxv_data) % (2*word_size), 0) + self.assertEqual(len(auxv_data) % (2*word_size), 0) # print("auxv contains {} entries".format(len(auxv_data) / (2*word_size))) @debugserver_test @@ -184,7 +184,7 @@ class TestGdbRemoteAuxvSupport(gdbremote self.assertIsNotNone(auxv_dict_iterated) # Verify both types of data collection returned same content. - self.assertEquals(auxv_dict_iterated, auxv_dict) + self.assertEqual(auxv_dict_iterated, auxv_dict) @debugserver_test def test_auxv_chunked_reads_work_debugserver(self): Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py (original) +++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteProcessInfo.py Mon Oct 26 11:50:39 2015 @@ -125,7 +125,7 @@ class TestGdbRemoteProcessInfo(gdbremote if expected_key not in process_info: missing_key_set.add(expected_key) - self.assertEquals(missing_key_set, set(), "the listed keys are missing in the qProcessInfo result") + self.assertEqual(missing_key_set, set(), "the listed keys are missing in the qProcessInfo result") def qProcessInfo_does_not_contain_keys(self, absent_key_set): procs = self.prep_debug_monitor_and_inferior() @@ -145,7 +145,7 @@ class TestGdbRemoteProcessInfo(gdbremote if unexpected_key in process_info: unexpected_key_set.add(unexpected_key) - self.assertEquals(unexpected_key_set, set(), "the listed keys were present but unexpected in qProcessInfo result") + self.assertEqual(unexpected_key_set, set(), "the listed keys were present but unexpected in qProcessInfo result") @skipUnlessDarwin @debugserver_test Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py (original) +++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteRegisterState.py Mon Oct 26 11:50:39 2015 @@ -91,7 +91,7 @@ class TestGdbRemoteRegisterState(gdbremo final_reg_values = self.read_register_values(gpr_reg_infos, endian, thread_id=thread_id) # print("final_reg_values: {}".format(final_reg_values)) self.assertIsNotNone(final_reg_values) - self.assertEquals(final_reg_values, initial_reg_values) + self.assertEqual(final_reg_values, initial_reg_values) @debugserver_test def test_grp_register_save_restore_works_with_suffix_debugserver(self): Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py (original) +++ lldb/trunk/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py Mon Oct 26 11:50:39 2015 @@ -45,7 +45,7 @@ class TestGdbRemoteThreadsInStopReply(gd # Wait until all threads have started. threads = self.wait_for_thread_count(thread_count, timeout_seconds=3) self.assertIsNotNone(threads) - self.assertEquals(len(threads), thread_count) + self.assertEqual(len(threads), thread_count) # Run, then stop the process, grab the stop reply content. self.reset_test_sequence() @@ -94,7 +94,7 @@ class TestGdbRemoteThreadsInStopReply(gd def stop_reply_reports_multiple_threads(self, thread_count): # Gather threads from stop notification when QThreadsInStopReply is enabled. stop_reply_threads = self.gather_stop_reply_threads(self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count) - self.assertEquals(len(stop_reply_threads), thread_count) + self.assertEqual(len(stop_reply_threads), thread_count) @debugserver_test def test_stop_reply_reports_multiple_threads_debugserver(self): @@ -113,7 +113,7 @@ class TestGdbRemoteThreadsInStopReply(gd def no_QListThreadsInStopReply_supplies_no_threads(self, thread_count): # Gather threads from stop notification when QThreadsInStopReply is not enabled. stop_reply_threads = self.gather_stop_reply_threads(None, thread_count) - self.assertEquals(len(stop_reply_threads), 0) + self.assertEqual(len(stop_reply_threads), 0) @debugserver_test def test_no_QListThreadsInStopReply_supplies_no_threads_debugserver(self): @@ -132,7 +132,7 @@ class TestGdbRemoteThreadsInStopReply(gd def stop_reply_reports_correct_threads(self, thread_count): # Gather threads from stop notification when QThreadsInStopReply is enabled. stop_reply_threads = self.gather_stop_reply_threads(self.ENABLE_THREADS_IN_STOP_REPLY_ENTRIES, thread_count) - self.assertEquals(len(stop_reply_threads), thread_count) + self.assertEqual(len(stop_reply_threads), thread_count) # Gather threads from q{f,s}ThreadInfo. self.reset_test_sequence() @@ -143,7 +143,7 @@ class TestGdbRemoteThreadsInStopReply(gd threads = self.parse_threadinfo_packets(context) self.assertIsNotNone(threads) - self.assertEquals(len(threads), thread_count) + self.assertEqual(len(threads), thread_count) # Ensure each thread in q{f,s}ThreadInfo appears in stop reply threads for tid in threads: Modified: lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py (original) +++ lldb/trunk/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py Mon Oct 26 11:50:39 2015 @@ -42,7 +42,7 @@ class TestGdbRemote_qThreadStopInfo(gdbr # Wait until all threads have started. threads = self.wait_for_thread_count(thread_count, timeout_seconds=3) self.assertIsNotNone(threads) - self.assertEquals(len(threads), thread_count) + self.assertEqual(len(threads), thread_count) # Grab stop reply for each thread via qThreadStopInfo{tid:hex}. stop_replies = {} @@ -67,7 +67,7 @@ class TestGdbRemote_qThreadStopInfo(gdbr kv_thread = kv_dict.get("thread") self.assertIsNotNone(kv_thread) kv_thread_id = int(kv_thread, 16) - self.assertEquals(kv_thread_id, thread) + self.assertEqual(kv_thread_id, thread) # Grab the stop id reported. stop_result_text = context.get("stop_result") @@ -81,7 +81,7 @@ class TestGdbRemote_qThreadStopInfo(gdbr def qThreadStopInfo_works_for_multiple_threads(self, thread_count): (stop_replies, _) = self.gather_stop_replies_via_qThreadStopInfo(thread_count) - self.assertEquals(len(stop_replies), thread_count) + self.assertEqual(len(stop_replies), thread_count) @debugserver_test def test_qThreadStopInfo_works_for_multiple_threads_debugserver(self): @@ -131,7 +131,7 @@ class TestGdbRemote_qThreadStopInfo(gdbr for thread_dict in list(thread_dicts.values()): name = thread_dict.get("name") self.assertIsNotNone(name) - self.assertEquals(name, expected_thread_name) + self.assertEqual(name, expected_thread_name) @unittest2.skip("MacOSX doesn't have a default thread name") @debugserver_test Modified: lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py (original) +++ lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py Mon Oct 26 11:50:39 2015 @@ -497,7 +497,7 @@ class LldbGdbServerTestCase(gdbremote_te # Collect all generics found. register_sets = { reg_info['set']:1 for reg_info in reg_infos if 'set' in reg_info } - self.assertEquals(self.targetHasAVX(), "Advanced Vector Extensions" in register_sets) + self.assertEqual(self.targetHasAVX(), "Advanced Vector Extensions" in register_sets) @llgs_test def test_qRegisterInfo_contains_avx_registers_llgs(self): @@ -574,7 +574,7 @@ class LldbGdbServerTestCase(gdbremote_te QC_thread_id = int(QC_thread_id_hex, 16) # Those two should be the same. - self.assertEquals(threads[0], QC_thread_id) + self.assertEqual(threads[0], QC_thread_id) @debugserver_test def test_qThreadInfo_matches_qC_launch_debugserver(self): @@ -640,7 +640,7 @@ class LldbGdbServerTestCase(gdbremote_te # Verify the response length. p_response = context.get("p_response") self.assertIsNotNone(p_response) - self.assertEquals(len(p_response), 2 * int(reg_info["bitsize"]) / 8) + self.assertEqual(len(p_response), 2 * int(reg_info["bitsize"]) / 8) # Increment loop reg_index += 1 @@ -682,7 +682,7 @@ class LldbGdbServerTestCase(gdbremote_te # Wait at most x seconds for 3 threads to be present. threads = self.wait_for_thread_count(3, timeout_seconds=5) - self.assertEquals(len(threads), 3) + self.assertEqual(len(threads), 3) # verify we can $H to each thead, and $qC matches the thread we set. for thread in threads: @@ -700,7 +700,7 @@ class LldbGdbServerTestCase(gdbremote_te # Verify the thread id. self.assertIsNotNone(context.get("thread_id")) - self.assertEquals(int(context.get("thread_id"), 16), thread) + self.assertEqual(int(context.get("thread_id"), 16), thread) @debugserver_test def test_Hg_switches_to_3_threads_launch_debugserver(self): @@ -830,7 +830,7 @@ class LldbGdbServerTestCase(gdbremote_te post_handle_thread_id = context.get("post_handle_thread_id") self.assertIsNotNone(post_handle_thread_id) post_handle_thread_id = int(post_handle_thread_id, 16) - self.assertEquals(post_handle_thread_id, print_thread_id) + self.assertEqual(post_handle_thread_id, print_thread_id) @unittest2.expectedFailure() @debugserver_test @@ -892,7 +892,7 @@ class LldbGdbServerTestCase(gdbremote_te # Ensure what we read from inferior memory is what we wrote. self.assertIsNotNone(context.get("read_contents")) read_contents = context.get("read_contents").decode("hex") - self.assertEquals(read_contents, MEMORY_CONTENTS) + self.assertEqual(read_contents, MEMORY_CONTENTS) @debugserver_test def test_m_packet_reads_memory_debugserver(self): @@ -1172,12 +1172,12 @@ class LldbGdbServerTestCase(gdbremote_te # Verify the stop signal reported was the breakpoint signal number. stop_signo = context.get("stop_signo") self.assertIsNotNone(stop_signo) - self.assertEquals(int(stop_signo,16), lldbutil.get_signal_number('SIGTRAP')) + self.assertEqual(int(stop_signo,16), lldbutil.get_signal_number('SIGTRAP')) # Ensure we did not receive any output. If the breakpoint was not set, we would # see output (from a launched process with captured stdio) printing a hello, world message. # That would indicate the breakpoint didn't take. - self.assertEquals(len(context["O_content"]), 0) + self.assertEqual(len(context["O_content"]), 0) # Verify that the PC for the main thread is where we expect it - right at the breakpoint address. # This acts as a another validation on the register reading code. @@ -1199,7 +1199,7 @@ class LldbGdbServerTestCase(gdbremote_te # Convert from target endian to int. returned_pc = lldbgdbserverutils.unpack_register_hex_unsigned(endian, p_response) - self.assertEquals(returned_pc, function_address) + self.assertEqual(returned_pc, function_address) # Verify that a breakpoint remove and continue gets us the expected output. self.reset_test_sequence() @@ -1304,7 +1304,7 @@ class LldbGdbServerTestCase(gdbremote_te # Ensure what we read from inferior memory is what we wrote. printed_message = context.get("printed_message") self.assertIsNotNone(printed_message) - self.assertEquals(printed_message, TEST_MESSAGE + "X") + self.assertEqual(printed_message, TEST_MESSAGE + "X") @debugserver_test def test_written_M_content_reads_back_correctly_debugserver(self): @@ -1394,7 +1394,7 @@ class LldbGdbServerTestCase(gdbremote_te # Wait for 3 threads to be present. threads = self.wait_for_thread_count(3, timeout_seconds=5) - self.assertEquals(len(threads), 3) + self.assertEqual(len(threads), 3) expected_reg_values = [] register_increment = 1 @@ -1452,7 +1452,7 @@ class LldbGdbServerTestCase(gdbremote_te read_value = lldbgdbserverutils.unpack_register_hex_unsigned(endian, p_response) # Make sure we read back what we wrote. - self.assertEquals(read_value, expected_reg_values[thread_index]) + self.assertEqual(read_value, expected_reg_values[thread_index]) thread_index += 1 # Note: as of this moment, a hefty number of the GPR writes are failing with E32 (everything except rax-rdx, rdi, rsi, rbp). Modified: lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py (original) +++ lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py Mon Oct 26 11:50:39 2015 @@ -28,15 +28,15 @@ class TestStubSetSIDTestCase(gdbremote_t def sid_is_same_without_setsid(self): stub_sid = self.get_stub_sid() - self.assertEquals(stub_sid, os.getsid(0)) + self.assertEqual(stub_sid, os.getsid(0)) def sid_is_different_with_setsid(self): stub_sid = self.get_stub_sid(["--setsid"]) - self.assertNotEquals(stub_sid, os.getsid(0)) + self.assertNotEqual(stub_sid, os.getsid(0)) def sid_is_different_with_S(self): stub_sid = self.get_stub_sid(["-S"]) - self.assertNotEquals(stub_sid, os.getsid(0)) + self.assertNotEqual(stub_sid, os.getsid(0)) @debugserver_test @skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target Modified: lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py (original) +++ lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py Mon Oct 26 11:50:39 2015 @@ -445,7 +445,7 @@ class GdbRemoteTestCaseBase(TestBase): if can_write and sock in can_write: written_byte_count = sock.send(request_bytes_remaining) request_bytes_remaining = request_bytes_remaining[written_byte_count:] - self.assertEquals(len(request_bytes_remaining), 0) + self.assertEqual(len(request_bytes_remaining), 0) def do_handshake(self, stub_socket, timeout_seconds=5): # Write the ack. @@ -454,7 +454,7 @@ class GdbRemoteTestCaseBase(TestBase): # Send the start no ack mode packet. NO_ACK_MODE_REQUEST = "$QStartNoAckMode#b0" bytes_sent = stub_socket.send(NO_ACK_MODE_REQUEST) - self.assertEquals(bytes_sent, len(NO_ACK_MODE_REQUEST)) + self.assertEqual(bytes_sent, len(NO_ACK_MODE_REQUEST)) # Receive the ack and "OK" self.expect_socket_recv(stub_socket, re.compile(r"^\+\$OK#[0-9a-fA-F]{2}$"), timeout_seconds) @@ -876,7 +876,7 @@ class GdbRemoteTestCaseBase(TestBase): # Handle ending entry. if key == 0: - self.assertEquals(value, 0) + self.assertEqual(value, 0) return auxv_dict # The key should not already be present. @@ -1156,7 +1156,7 @@ class GdbRemoteTestCaseBase(TestBase): context = self.expect_gdbremote_sequence() self.assertIsNotNone(context) self.assertIsNotNone(context.get("stop_signo")) - self.assertEquals(int(context.get("stop_signo"), 16), + self.assertEqual(int(context.get("stop_signo"), 16), lldbutil.get_signal_number('SIGTRAP')) single_step_count += 1 @@ -1270,19 +1270,19 @@ class GdbRemoteTestCaseBase(TestBase): args["expected_g_c2"] = "0" (state_reached, step_count) = self.count_single_steps_until_true(main_thread_id, self.g_c1_c2_contents_are, args, max_step_count=5, use_Hc_packet=use_Hc_packet, step_instruction=step_instruction) self.assertTrue(state_reached) - self.assertEquals(step_count, 1) + self.assertEqual(step_count, 1) # Verify we hit the next state. args["expected_g_c1"] = "0" args["expected_g_c2"] = "0" (state_reached, step_count) = self.count_single_steps_until_true(main_thread_id, self.g_c1_c2_contents_are, args, max_step_count=5, use_Hc_packet=use_Hc_packet, step_instruction=step_instruction) self.assertTrue(state_reached) - self.assertEquals(step_count, 1) + self.assertEqual(step_count, 1) # Verify we hit the next state. args["expected_g_c1"] = "0" args["expected_g_c2"] = "1" (state_reached, step_count) = self.count_single_steps_until_true(main_thread_id, self.g_c1_c2_contents_are, args, max_step_count=5, use_Hc_packet=use_Hc_packet, step_instruction=step_instruction) self.assertTrue(state_reached) - self.assertEquals(step_count, 1) + self.assertEqual(step_count, 1) Modified: lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py (original) +++ lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py Mon Oct 26 11:50:39 2015 @@ -23,7 +23,7 @@ class TestGdbRemoteAbort(gdbremote_testc hex_exit_code = context.get("hex_exit_code") self.assertIsNotNone(hex_exit_code) - self.assertEquals(int(hex_exit_code, 16), + self.assertEqual(int(hex_exit_code, 16), lldbutil.get_signal_number('SIGABRT')) @debugserver_test Modified: lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py (original) +++ lldb/trunk/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py Mon Oct 26 11:50:39 2015 @@ -25,7 +25,7 @@ class TestGdbRemoteSegFault(gdbremote_te hex_exit_code = context.get("hex_exit_code") self.assertIsNotNone(hex_exit_code) - self.assertEquals(int(hex_exit_code, 16), expected_signo) + self.assertEqual(int(hex_exit_code, 16), expected_signo) @debugserver_test def test_inferior_seg_fault_received_debugserver(self): Modified: lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py (original) +++ lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py Mon Oct 26 11:50:39 2015 @@ -493,7 +493,7 @@ class GdbRemoteEntry(GdbRemoteEntryBase) capture_text = match.group(group_index) if not capture_text: raise Exception("No content to expect for group index {}".format(group_index)) - asserter.assertEquals(capture_text, context[var_name]) + asserter.assertEqual(capture_text, context[var_name]) return context Modified: lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py?rev=251303&r1=251302&r2=251303&view=diff ============================================================================== --- lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py (original) +++ lldb/trunk/test/tools/lldb-server/test/test_lldbgdbserverutils.py Mon Oct 26 11:50:39 2015 @@ -31,7 +31,7 @@ class TestLldbGdbServerUtils(unittest2.T def test_entry_regex_saves_match(self): entry = GdbRemoteEntry(is_send_to_remote=False, regex=re.compile(r"^\$QC([0-9a-fA-F]+)#"), capture={ 1:"thread_id" }) context = entry.assert_match(self, "$QC980#00") - self.assertEquals(context["thread_id"], "980") + self.assertEqual(context["thread_id"], "980") def test_entry_regex_expect_captures_success(self): context = { "thread_id":"980" } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits