def test_iscoroutinefunction_unhashable_input(): # Ensure iscoroutinefunction can handle unhashable callables assert not iscoroutinefunction(_UnhashableCallable())
def test__UnhashableCallable(): func = _UnhashableCallable() assert func(1) == 2 with pytest.raises(TypeError, match="unhashable"): hash(func)