def test_if_raises_error_on_not_empty_arg_list_on_method(self): class FakeClass(object): def method_with_args(self, a): pass with pytest.raises(SignatureError): validate_if_callable_without_args(FakeClass.method_with_args)
def test_if_raises_error_on_not_empty_arg_list_on_method(self): class FakeClass(object): def method_with_args(self, a): pass with pytest.raises(SignatureError): validate_if_callable_without_args(FakeClass.method_with_args)
def test_if_rases_error_on_class_with_constructor_with_args(self): class FakeClass(object): def __init__(self, a): pass with pytest.raises(SignatureError): validate_if_callable_without_args(FakeClass)
def test_if_rases_error_on_class_with_constructor_with_args(self): class FakeClass(object): def __init__(self, a): pass with pytest.raises(SignatureError): validate_if_callable_without_args(FakeClass)
def test_if_not_rases_error_on_method_without_args(self): class FakeClass(object): def method_without_args(self): pass validate_if_callable_without_args(FakeClass.method_without_args)
def test_if_not_raises_error_on_empty_arg_list_on_lambda(self): validate_if_callable_without_args(lambda: 0)
def test_if_not_raises_error_on_empty_arg_list_on_function(self): def fake_func(): pass validate_if_callable_without_args(fake_func)
def test_if_raises_error_on_non_empty_args_list_on_lambda(self): with pytest.raises(TypeError): validate_if_callable_without_args(lambda x: x)
def test_if_raises_error_on_non_empty_args_list_on_function(self): def fake_func(a): return a with pytest.raises(TypeError): validate_if_callable_without_args(fake_func)
def test_if_raises_error_on_non_empty_args_list_on_function(self): def fake_func(a): return a with pytest.raises(TypeError): validate_if_callable_without_args(fake_func)
def test_if_not_rases_error_on_class_without_constructor(self): class FakeClass(object): pass validate_if_callable_without_args(FakeClass)
def test_if_not_rases_error_on_method_without_args(self): class FakeClass(object): def method_without_args(self): pass validate_if_callable_without_args(FakeClass.method_without_args)
def test_if_not_raises_error_on_empty_arg_list_on_lambda(self): validate_if_callable_without_args(lambda: 0)
def test_if_not_raises_error_on_empty_arg_list_on_function(self): def fake_func(): pass validate_if_callable_without_args(fake_func)
def test_if_raises_error_on_non_empty_args_list_on_lambda(self): with pytest.raises(TypeError): validate_if_callable_without_args(lambda x: x)
def test_if_not_rases_error_on_class_without_constructor(self): class FakeClass(object): pass validate_if_callable_without_args(FakeClass)
def test_if_raises_error_on_non_collable(self): with pytest.raises(TypeError): validate_if_callable_without_args(1)
def test_if_raises_error_on_non_collable(self): with pytest.raises(TypeError): validate_if_callable_without_args(1)