diff tests/test-rust-discovery.py @ 42741:4e7bd6180b53

rust-discovery: optionally don't randomize at all, for tests As seen from Python, this is a new `randomize` kwarg in init of the discovery object. It replaces random picking by some arbitrary yet deterministic strategy. This is the same as what test-setdiscovery.t does, with the added benefit to be usable both in Python and Rust implementations. Differential Revision: https://phab.mercurial-scm.org/D6426
author Georges Racinet <georges.racinet@octobus.net>
date Tue, 21 May 2019 17:43:55 +0200
parents b6f3f704a561
children 791791a1fd4e
line wrap: on
line diff
--- a/tests/test-rust-discovery.py	Fri May 17 01:56:57 2019 +0200
+++ b/tests/test-rust-discovery.py	Tue May 21 17:43:55 2019 +0200
@@ -103,6 +103,9 @@
         self.assertTrue(disco.iscomplete())
         self.assertEqual(disco.commonheads(), {1})
 
+    def testinitnorandom(self):
+        PartialDiscovery(self.repo(), [3], True, randomize=False)
+
 if __name__ == '__main__':
     import silenttestrunner
     silenttestrunner.main(__name__)