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

Function test_eq_placeholder

test/mitmproxy/proxy/test_tutils.py:140–153  ·  view source on GitHub ↗

_eq should assign placeholders.

()

Source from the content-addressed store, hash-verified

138
139
140def test_eq_placeholder():
141 """_eq should assign placeholders."""
142 a = TCommand()
143 a.foo = 42
144 a.bar = tutils.Placeholder()
145 b = TCommand()
146 b.foo = tutils.Placeholder()
147 b.bar = 43
148 assert tutils._eq(a, b)
149 assert a.foo == b.foo() == 42
150 assert a.bar() == b.bar == 43
151
152 b.foo._obj = 44
153 assert not tutils._eq(a, b)
154
155
156@pytest.mark.parametrize("swap", [False, True])

Callers

nothing calls this directly

Calls 3

TCommandClass · 0.85
fooMethod · 0.80
barMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…