Skip to content

Commit

Permalink
Add tests for #175
Browse files Browse the repository at this point in the history
  • Loading branch information
fornellas committed Apr 21, 2020
1 parent e04f65c commit 9d51473
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/mock_callable_testslide.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,23 @@ def it_calls_original_implementation(self):
self.original_callable(*self.call_args, **self.call_kwargs),
)

if not empty_args:

@context.sub_context("with type_validation=False")
def with_type_validation_False(context):
context.memoize("type_validation", lambda self: False)

@context.example
def it_doest_not_type_validate(self):
call_args = [1 for arg in self.call_args]
call_kwargs = {key: 1 for key in self.call_kwargs.keys()}
mock_callable(
self.target_arg,
self.callable_arg,
type_validation=self.type_validation,
).for_call(*call_args, **call_kwargs).to_return_value(None)
self.callable_target(*call_args, **call_kwargs)

else:

@context.example
Expand Down

0 comments on commit 9d51473

Please sign in to comment.