Lines Matching refs:counters
45 counters = {}
48 if name in counters:
49 counters[name] += 1
51 counters[name] = 1
52 return counters
96 counters = self._collect_reviewers(num_tries, "rust/crates/libc")
97 self.assertEqual(len(counters), len(reviewers.RUST_REVIEWERS))
98 for n in counters.values():
100 self.assertEqual(sum(counters.values()), num_tries)
109 counters = self._collect_reviewers(20, "external/rust/crates/p1")
110 self.assertEqual(len(counters), 1)
111 self.assertTrue(counters["r=x@g.com"], 20)
112 counters = self._collect_reviewers(20, "external/rust/crates/p_any")
113 self.assertEqual(len(counters), 2)
114 self.assertGreater(counters["r=x@g.com"], 2)
115 self.assertGreater(counters["r=y@g.com"], 2)
116 self.assertTrue(counters["r=x@g.com"] + counters["r=y@g.com"], 20)
117 counters = self._collect_reviewers(20, "external/rust/crates/p_all")
119 self.assertEqual(counters["r=x@g.com,r=y@g.com,r=z@g"], 20)