Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions stream2py/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,6 @@ def test_timer_stop_accepts_context_manager_exit_args():
assert timer.start_time is None


@pytest.mark.xfail(
strict=True,
reason="https://github.com/i2mint/stream2py/issues/33: the variadic check is not called",
)
def test_exit_function_validation_rejects_a_one_argument_function():
from stream2py.util import ExitFunctionValidation

Expand Down
4 changes: 2 additions & 2 deletions stream2py/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ class ExitFunctionValidation(TypeValidationError):
@staticmethod
def is_valid(obj):
"""Whether ``obj`` is a valid function of this kind."""
return callable(obj) and (
_callable_has_a_variadic_pos or _has_min_num_of_arguments(obj, 4)
return callable(obj) and bool(
_callable_has_a_variadic_pos(obj) or _has_min_num_of_arguments(obj, 4)
)


Expand Down
Loading