mercurial/testing/revlog.py
changeset 51241 03fdd4d7b5bd
parent 51236 7eea2e4109ae
child 51250 96e05f1a99bd
--- a/mercurial/testing/revlog.py	Sun Oct 29 11:21:18 2023 +0100
+++ b/mercurial/testing/revlog.py	Sun Oct 29 12:01:57 2023 +0100
@@ -45,8 +45,17 @@
             data = data_non_inlined
         return cparsers.parse_index2(data, False)[0]
 
+
+@unittest.skipIf(
+    MixedIndex is None,
+    'The Rust index is not available. It is needed for this test.',
+)
+class RustRevlogBasedTestBase(unittest.TestCase):
     def parserustindex(self, data=None):
         if data is None:
             data = data_non_inlined
-        cindex = self.parseindex(data=data)
+        # not inheriting RevlogBasedTestCase to avoid having a
+        # `parseindex` method that would be shadowed by future subclasses
+        # this duplication will soon be removed
+        cindex = cparsers.parse_index2(data, False)[0]
         return MixedIndex(cindex, data, REVLOGV1)