MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / test_layer_stack

Function test_layer_stack

test/mitmproxy/proxy/test_tunnel.py:272–284  ·  view source on GitHub ↗
(tctx)

Source from the content-addressed store, hash-verified

270
271
272def test_layer_stack(tctx):
273 stack = tunnel.LayerStack()
274 a = TChildLayer(tctx)
275 b = TChildLayer(tctx)
276 stack /= a
277 stack /= b
278 assert stack[0] == a
279 assert a.child_layer is b
280
281 stack2 = tunnel.LayerStack()
282 stack2 /= TChildLayer(tctx)
283 stack2 /= stack
284 assert stack2[0].child_layer is a # type: ignore

Callers

nothing calls this directly

Calls 1

TChildLayerClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…