Patchwork D6725: tests: split joint repo/changelog fake into one for each type

login
register
mail settings
Submitter phabricator
Date Aug. 15, 2019, 3:08 p.m.
Message ID <a05fa8ffd3b4df1909bae8b3d21ac5d0@localhost.localdomain>
Download mbox | patch
Permalink /patch/41300/
State Not Applicable
Headers show

Comments

phabricator - Aug. 15, 2019, 3:08 p.m.
Closed by commit rHG034b2bf377f0: tests: split joint repo/changelog fake into one for each type (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6725?vs=16182&id=16210

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6725/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6725

AFFECTED FILES
  tests/test-rust-discovery.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-rust-discovery.py b/tests/test-rust-discovery.py
--- a/tests/test-rust-discovery.py
+++ b/tests/test-rust-discovery.py
@@ -31,11 +31,14 @@ 
     b'\x00\x00\x00\x00\x00\x00\x00\x00\x00'
     )
 
+class fakechangelog(object):
+    def __init__(self, idx):
+        self.index = idx
+
 class fakerepo(object):
     def __init__(self, idx):
         """Just make so that self.changelog.index is the given idx."""
-        self.index = idx
-        self.changelog = self
+        self.changelog = fakechangelog(idx)
 
 @unittest.skipIf(PartialDiscovery is None or cparsers is None,
                  "rustext or the C Extension parsers module "