diff tests/test-rust-discovery.py @ 42218:1b0be75cb61f

rust-discovery: implementing and exposing stats() This time, it's simple enough that we can do it in all layers in one shot. Differential Revision: https://phab.mercurial-scm.org/D6233
author Georges Racinet <georges.racinet@octobus.net>
date Thu, 14 Mar 2019 17:57:31 +0000
parents 13b64247f48f
children a7f1a0b3f461
line wrap: on
line diff
--- a/tests/test-rust-discovery.py	Wed Feb 20 09:04:39 2019 +0100
+++ b/tests/test-rust-discovery.py	Thu Mar 14 17:57:31 2019 +0000
@@ -82,6 +82,14 @@
 
         self.assertEqual(disco.commonheads(), {1})
 
+    def testaddmissingsstats(self):
+        idx = self.parseindex()
+        disco = PartialDiscovery(idx, [3])
+        self.assertIsNone(disco.stats()['undecided'], None)
+
+        disco.addmissings([2])
+        self.assertEqual(disco.stats()['undecided'], 2)
+
     def testaddinfocommonfirst(self):
         idx = self.parseindex()
         disco = PartialDiscovery(idx, [3])