[Lldb-commits] [lldb] [lldb] Migrate distutils.version.LooseVersion to packaging (PR #82066)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 16 21:43:19 PST 2024


================
@@ -1,33 +1,33 @@
 """
-This is a sanity check that verifies that test can be sklipped based on settings.
+This is a sanity check that verifies that test can be skipped based on settings.
 """
 
-
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 
 
 class SettingSkipSanityTestCase(TestBase):
     NO_DEBUG_INFO_TESTCASE = True
+    REAL_PYTHON_VERSION = "3.0"
+    FUTURE_PYTHON_VERSION = "4.0"
 
-    @skipIf(py_version=(">=", (3, 0)))
+    @skipIf(py_version=(">=", REAL_PYTHON_VERSION))
     def testSkip(self):
-        """This setting is on by default"""
-        self.assertTrue(False, "This test should not run!")
-
-    @skipIf(py_version=("<", (3, 0)))
-    def testNoMatch(self):
-        self.assertTrue(True, "This test should run!")
+        self.assertTrue(False, "This test should not run and fail (SKIPPED)")
 
-    @skipIf(setting=("target.i-made-this-one-up", "true"))
-    def testNotExisting(self):
-        self.assertTrue(True, "This test should run!")
+    @skipIf(py_version=("<", FUTURE_PYTHON_VERSION))
+    def testNoSKip(self):
+        self.assertTrue(True, "This test should run and pass(PASS)")
 
-    @expectedFailureAll(py_version=(">=", (3, 0)))
+    @expectedFailureAll(py_version=("<", FUTURE_PYTHON_VERSION))
     def testXFAIL(self):
-        self.assertTrue(False, "This test should run and fail!")
+        self.assertTrue(False, "This test should expectedly fail (XFAIL)")
 
-    @expectedFailureAll(py_version=("<", (3, 0)))
+    @expectedFailureAll(py_version=(">=", FUTURE_PYTHON_VERSION))
----------------
felipepiovezan wrote:

is this right? what used to be <3.0 is now >=4.0?

https://github.com/llvm/llvm-project/pull/82066


More information about the lldb-commits mailing list