MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_signal_weakref

Function test_signal_weakref

test/mitmproxy/utils/test_signals.py:43–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42
43def test_signal_weakref() -> None:
44 def m1():
45 pass
46
47 def m2():
48 pass
49
50 s = SyncSignal(lambda: None)
51 s.connect(m1)
52 s.connect(m2)
53 del m2
54 s.send()
55 assert len(s.receivers) == 1
56
57
58def test_sync_signal_async_receiver() -> None:

Callers

nothing calls this directly

Calls 3

SyncSignalFunction · 0.90
connectMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…