Skip to content

Commit 9f68fc8

Browse files
authored
Add missing coverage for SignalRegistrationInterface (#758)
1 parent 1c93baa commit 9f68fc8

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/test_services.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,18 @@ class MyPartialListener(r.ServiceListener):
275275
)
276276

277277
zc.close()
278+
279+
280+
def test_signal_registration_interface():
281+
"""Test adding and removing from the SignalRegistrationInterface."""
282+
283+
interface = r.SignalRegistrationInterface([])
284+
285+
def dummy():
286+
pass
287+
288+
interface.register_handler(dummy)
289+
interface.unregister_handler(dummy)
290+
291+
with pytest.raises(ValueError):
292+
interface.unregister_handler(dummy)

0 commit comments

Comments
 (0)