FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: pin unknown-kwarg rejection in Signal.fire test · python-zeroconf/python-zeroconf@b127121 · GitHub

Commit b127121

Browse files
committed
test: pin unknown-kwarg rejection in Signal.fire test
1 parent aed6b41 commit b127121

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎tests/test_services.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,13 @@ def test_signal_fire_rejects_unknown_kwarg():
308308
signal = r.Signal()
309309
signal.registration_interface.register_handler(lambda **_: None)
310310

311-
with pytest.raises(TypeError):
312-
signal.fire( # type: ignore[call-arg]
313-
zerocnf=None,
311+
with pytest.raises(TypeError, match="unexpected keyword argument"):
312+
signal.fire(
313+
zeroconf=None, # type: ignore[arg-type]
314314
service_type="_http._tcp.local.",
315315
name="x._http._tcp.local.",
316316
state_change=r.ServiceStateChange.Added,
317+
bogus=1, # type: ignore[call-arg]
317318
)
318319

319320

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL