MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_callbackregistry_signals

Function test_callbackregistry_signals

lib/matplotlib/tests/test_cbook.py:509–519  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

507
508
509def test_callbackregistry_signals():
510 cr = cbook.CallbackRegistry(signals=["foo"])
511 results = []
512 def cb(x): results.append(x)
513 cr.connect("foo", cb)
514 with pytest.raises(ValueError):
515 cr.connect("bar", cb)
516 cr.process("foo", 1)
517 with pytest.raises(ValueError):
518 cr.process("bar", 1)
519 assert results == [1]
520
521
522def test_callbackregistry_blocking():

Callers

nothing calls this directly

Calls 2

connectMethod · 0.95
processMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…