Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Feb 20, 2024
1 parent ea98ef8 commit d61ea51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/psygnal/_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,9 @@ def emit(
If `check_nargs` and/or `check_types` are `True`, and the corresponding
checks fail.
"""
if self._is_blocked or len(self._slots) == 0:
if self._is_blocked or (
len(self._slots) == 0 and SignalInstance._debug_hook is None
):
return None

if check_nargs:
Expand Down
1 change: 1 addition & 0 deletions tests/test_psygnal.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def test_signature_provided():

def test_emit_checks():
emitter = Emitter()
emitter.one_int.connect(f_no_arg)

emitter.one_int.emit(check_nargs=False)
emitter.one_int.emit()
Expand Down

0 comments on commit d61ea51

Please sign in to comment.