MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_max_size

Function test_max_size

test/mitmproxy/addons/test_eventstore.py:47–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45
46
47async def test_max_size():
48 store = eventstore.EventStore(3)
49 assert store.size == 3
50 logging.warning("foo")
51 logging.warning("bar")
52 logging.warning("baz")
53 await asyncio.sleep(0)
54 assert len(store.data) == 3
55 assert "baz" in store.data[-1].msg
56
57 # overflow
58 logging.warning("boo")
59 await asyncio.sleep(0)
60 assert len(store.data) == 3
61 assert "boo" in store.data[-1].msg
62 store.done()

Callers

nothing calls this directly

Calls 1

doneMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…