diff tests/test-rust-discovery.py @ 51242:0b81440e2a73

rust-index: using `hg::index::Index` in discovery At this point the C index is not used any more: we had to remove `pyindex_to_graph()` to avoid the dead code warning.
author Georges Racinet <georges.racinet@octobus.net>
date Sun, 29 Oct 2023 12:07:05 +0100
parents 642e31cb55f0
children e52dc683bf6b
line wrap: on
line diff
--- a/tests/test-rust-discovery.py	Sun Oct 29 12:01:57 2023 +0100
+++ b/tests/test-rust-discovery.py	Sun Oct 29 12:07:05 2023 +0100
@@ -1,6 +1,7 @@
 import unittest
 
 from mercurial import policy
+from mercurial.testing import revlog as revlogtesting
 
 PartialDiscovery = policy.importrust('discovery', member='PartialDiscovery')
 
@@ -47,7 +48,7 @@
     "rustext or the C Extension parsers module "
     "discovery relies on is not available",
 )
-class rustdiscoverytest(unittest.TestCase):
+class rustdiscoverytest(revlogtesting.RustRevlogBasedTestBase):
     """Test the correctness of binding to Rust code.
 
     This test is merely for the binding to Rust itself: extraction of
@@ -60,7 +61,7 @@
     """
 
     def parseindex(self):
-        return cparsers.parse_index2(data_non_inlined, False)[0]
+        return self.parserustindex(data=data_non_inlined)
 
     def repo(self):
         return fakerepo(self.parseindex())