Mercurial > hg
comparison tests/test-rust-discovery.py @ 42759:791791a1fd4e
tests: split joint repo/changelog fake into one for each type
I'm just not comfortable with fakes that get overloaded for multiple
types: too often it gets out of hand and becomes difficult to trace.
Differential Revision: https://phab.mercurial-scm.org/D6725
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 14 Aug 2019 16:11:45 -0400 |
parents | 4e7bd6180b53 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
42758:e9f503074044 | 42759:791791a1fd4e |
---|---|
29 b'\x00\x00\x00\x03\x00\x00\x00\x02\xff\xff\xff\xff\x12\xcb\xeby1' | 29 b'\x00\x00\x00\x03\x00\x00\x00\x02\xff\xff\xff\xff\x12\xcb\xeby1' |
30 b'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' | 30 b'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' |
31 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00' | 31 b'\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
32 ) | 32 ) |
33 | 33 |
34 class fakechangelog(object): | |
35 def __init__(self, idx): | |
36 self.index = idx | |
37 | |
34 class fakerepo(object): | 38 class fakerepo(object): |
35 def __init__(self, idx): | 39 def __init__(self, idx): |
36 """Just make so that self.changelog.index is the given idx.""" | 40 """Just make so that self.changelog.index is the given idx.""" |
37 self.index = idx | 41 self.changelog = fakechangelog(idx) |
38 self.changelog = self | |
39 | 42 |
40 @unittest.skipIf(PartialDiscovery is None or cparsers is None, | 43 @unittest.skipIf(PartialDiscovery is None or cparsers is None, |
41 "rustext or the C Extension parsers module " | 44 "rustext or the C Extension parsers module " |
42 "discovery relies on is not available") | 45 "discovery relies on is not available") |
43 class rustdiscoverytest(unittest.TestCase): | 46 class rustdiscoverytest(unittest.TestCase): |