##// END OF EJS Templates
rust-python-testing: separated base test classes...
Georges Racinet on incendie.racinet.fr -
r52137:03fdd4d7 default
parent child Browse files
Show More
@@ -45,8 +45,17 b' class RevlogBasedTestBase(unittest.TestC'
45 data = data_non_inlined
45 data = data_non_inlined
46 return cparsers.parse_index2(data, False)[0]
46 return cparsers.parse_index2(data, False)[0]
47
47
48
49 @unittest.skipIf(
50 MixedIndex is None,
51 'The Rust index is not available. It is needed for this test.',
52 )
53 class RustRevlogBasedTestBase(unittest.TestCase):
48 def parserustindex(self, data=None):
54 def parserustindex(self, data=None):
49 if data is None:
55 if data is None:
50 data = data_non_inlined
56 data = data_non_inlined
51 cindex = self.parseindex(data=data)
57 # not inheriting RevlogBasedTestCase to avoid having a
58 # `parseindex` method that would be shadowed by future subclasses
59 # this duplication will soon be removed
60 cindex = cparsers.parse_index2(data, False)[0]
52 return MixedIndex(cindex, data, REVLOGV1)
61 return MixedIndex(cindex, data, REVLOGV1)
@@ -36,7 +36,7 b' except ImportError:'
36 'The Rust or C version of the "parsers" module, which the "ancestor" module'
36 'The Rust or C version of the "parsers" module, which the "ancestor" module'
37 ' relies on, is not available.',
37 ' relies on, is not available.',
38 )
38 )
39 class rustancestorstest(revlogtesting.RevlogBasedTestBase):
39 class rustancestorstest(revlogtesting.RustRevlogBasedTestBase):
40 """Test the correctness of binding to Rust code.
40 """Test the correctness of binding to Rust code.
41
41
42 This test is merely for the binding to Rust itself: extraction of
42 This test is merely for the binding to Rust itself: extraction of
General Comments 0
You need to be logged in to leave comments. Login now