MCPcopy Index your code
hub / github.com/prometheus/client_python / setUp

Method setUp

tests/test_exposition.py:25–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

23
24class TestGenerateText(unittest.TestCase):
25 def setUp(self):
26 self.registry = CollectorRegistry()
27
28 # Mock time so _created values are fixed.
29 self.old_time = time.time
30 time.time = lambda: 123.456
31
32 def tearDown(self):
33 time.time = self.old_time

Callers

nothing calls this directly

Calls 1

CollectorRegistryClass · 0.90

Tested by

no test coverage detected