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

Method test_process_restart

tests/test_multiprocess.py:600–605  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

598 self.d = mmap_dict.MmapedDict(self.tempfile)
599
600 def test_process_restart(self):
601 self.d.write_value('abc', 123.0, 987.0)
602 self.d.close()
603 self.d = mmap_dict.MmapedDict(self.tempfile)
604 self.assertEqual((123, 987.0), self.d.read_value('abc'))
605 self.assertEqual([('abc', 123.0, 987.0)], list(self.d.read_all_values()))
606
607 def test_expansion(self):
608 key = 'a' * mmap_dict._INITIAL_MMAP_SIZE

Callers

nothing calls this directly

Calls 4

write_valueMethod · 0.80
closeMethod · 0.80
read_valueMethod · 0.80
read_all_valuesMethod · 0.80

Tested by

no test coverage detected