[Lldb-commits] [lldb] d5c0b1f - [test] Remove unused `unittest2` import

Jordan Rupprecht via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 26 18:02:22 PST 2023


Author: Jordan Rupprecht
Date: 2023-01-26T18:02:16-08:00
New Revision: d5c0b1f73b0502158d9b3afa0ba7b22b69f0823e

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

LOG: [test] Remove unused `unittest2` import

Added: 
    

Modified: 
    lldb/test/API/python_api/target/TestTargetAPI.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/python_api/target/TestTargetAPI.py b/lldb/test/API/python_api/target/TestTargetAPI.py
index f1a379bc2f30e..15ac04cfa74c4 100644
--- a/lldb/test/API/python_api/target/TestTargetAPI.py
+++ b/lldb/test/API/python_api/target/TestTargetAPI.py
@@ -2,7 +2,6 @@
 Test SBTarget APIs.
 """
 
-import unittest2
 import os
 import lldb
 from lldbsuite.test.decorators import *
@@ -29,7 +28,6 @@ def setUp(self):
     #
     # It does not segfaults now.  But for dwarf, the variable value is None if
     # the inferior process does not exist yet.  The radar has been updated.
-    #@unittest232.skip("segmentation fault -- skipping")
     def test_find_global_variables(self):
         """Exercise SBTarget.FindGlobalVariables() API."""
         d = {'EXE': 'b.out'}
@@ -128,7 +126,8 @@ def test_get_ABIName(self):
         process = target.LaunchSimple(
             None, None, self.get_process_working_directory())
         abi_after_launch = target.GetABIName()
-        self.assertEqual(abi_pre_launch, abi_after_launch, "ABI's match before and during run")
+        self.assertEqual(abi_pre_launch, abi_after_launch,
+                         "ABI's match before and during run")
 
     def test_read_memory(self):
         d = {'EXE': 'b.out'}
@@ -157,7 +156,6 @@ def test_read_memory(self):
         self.assertSuccess(error, "Make sure memory read succeeded")
         self.assertEqual(len(content), 1)
 
-
     @skipIfWindows  # stdio manipulation unsupported on Windows
     @skipIfRemote   # stdio manipulation unsupported on remote iOS devices<rdar://problem/54581135>
     @skipIf(oslist=["linux"], archs=["arm", "aarch64"])
@@ -371,7 +369,7 @@ def test_launch_new_process_and_redirect_stdout(self):
 
         if lldb.remote_platform:
             stdout_path = lldbutil.append_to_process_working_directory(self,
-                "lldb-stdout-redirect.txt")
+                                                                       "lldb-stdout-redirect.txt")
         else:
             stdout_path = local_path
         error = lldb.SBError()
@@ -492,16 +490,17 @@ def test_default_arch(self):
         """ Test the other two target create methods using LLDB_ARCH_DEFAULT. """
         self.build()
         exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTargetWithFileAndArch(exe, lldb.LLDB_ARCH_DEFAULT)
+        target = self.dbg.CreateTargetWithFileAndArch(
+            exe, lldb.LLDB_ARCH_DEFAULT)
         self.assertTrue(target.IsValid(), "Default arch made a valid target.")
         # This should also work with the target's triple:
         target2 = self.dbg.CreateTargetWithFileAndArch(exe, target.GetTriple())
         self.assertTrue(target2.IsValid(), "Round trip with triple works")
         # And this triple should work for the FileAndTriple API:
-        target3 = self.dbg.CreateTargetWithFileAndTargetTriple(exe, target.GetTriple())
+        target3 = self.dbg.CreateTargetWithFileAndTargetTriple(
+            exe, target.GetTriple())
         self.assertTrue(target3.IsValid())
 
-
     @skipIfWindows
     def test_is_loaded(self):
         """Exercise SBTarget.IsLoaded(SBModule&) API."""


        


More information about the lldb-commits mailing list