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

Function eq

test/mitmproxy/proxy/tutils.py:58–69  ·  view source on GitHub ↗

Compare an indiviual event/command or a list of events/commands.

(
    a: PlaybookEntry | Iterable[PlaybookEntry],
    b: PlaybookEntry | Iterable[PlaybookEntry],
)

Source from the content-addressed store, hash-verified

56
57
58def eq(
59 a: PlaybookEntry | Iterable[PlaybookEntry],
60 b: PlaybookEntry | Iterable[PlaybookEntry],
61):
62 """
63 Compare an indiviual event/command or a list of events/commands.
64 """
65 if isinstance(a, collections.abc.Iterable) and isinstance(
66 b, collections.abc.Iterable
67 ):
68 return all(_eq(x, y) for x, y in itertools.zip_longest(a, b))
69 return _eq(a, b)
70
71
72def _fmt_entry(x: PlaybookEntry):

Callers 2

__bool__Method · 0.70
playbook_evalMethod · 0.70

Calls 1

_eqFunction · 0.85

Tested by

no test coverage detected