(self)
| 68 | assert not is_simple_callable(Foo().invalid) |
| 69 | |
| 70 | def test_function(self): |
| 71 | def simple(): |
| 72 | pass |
| 73 | |
| 74 | def valid(param='value', param2='value'): |
| 75 | pass |
| 76 | |
| 77 | def valid_vargs_kwargs(*args, **kwargs): |
| 78 | pass |
| 79 | |
| 80 | def invalid(param, param2='value'): |
| 81 | pass |
| 82 | |
| 83 | assert is_simple_callable(simple) |
| 84 | assert is_simple_callable(valid) |
| 85 | assert is_simple_callable(valid_vargs_kwargs) |
| 86 | assert not is_simple_callable(invalid) |
| 87 | |
| 88 | @pytest.mark.parametrize('obj', (True, None, "str", b'bytes', 123, 1.23)) |
| 89 | def test_not_callable(self, obj): |
nothing calls this directly
no test coverage detected