MCPcopy
hub / github.com/google-deepmind/acme / test_counter_caching

Method test_counter_caching

acme/utils/counting_test.py:70–74  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 self.assertEqual(counts['foo'], num_threads)
69
70 def test_counter_caching(self):
71 parent = counting.Counter()
72 counter = counting.Counter(parent, time_delta=0.)
73 counter.increment(foo=12)
74 self.assertEqual(parent.get_counts(), counter.get_counts())
75
76 def test_shared_counts(self):
77 # Two counters with shared parent should share counts (modulo namespacing).

Callers

nothing calls this directly

Calls 2

incrementMethod · 0.95
get_countsMethod · 0.95

Tested by

no test coverage detected