| 92 | |
| 93 | |
| 94 | def test_exported_functions(): |
| 95 | # Check that all exported concrete functions can be called with |
| 96 | # the right number of arguments. |
| 97 | # Note that unregistered functions (e.g. with a mismatching name) |
| 98 | # will raise KeyError. |
| 99 | functions = exported_functions |
| 100 | assert len(functions) >= 10 |
| 101 | for func in functions: |
| 102 | desc = func.__arrow_compute_function__ |
| 103 | if desc['options_required']: |
| 104 | # Skip this function as it will fail with a different error |
| 105 | # message if we don't pass an options instance. |
| 106 | continue |
| 107 | arity = desc['arity'] |
| 108 | if arity == 0: |
| 109 | continue |
| 110 | if arity is Ellipsis: |
| 111 | args = [object()] * 3 |
| 112 | else: |
| 113 | args = [object()] * arity |
| 114 | with pytest.raises(TypeError, |
| 115 | match="Got unexpected argument type " |
| 116 | "<class 'object'> for compute function"): |
| 117 | func(*args) |
| 118 | |
| 119 | |
| 120 | def test_hash_aggregate_not_exported(): |