def test_passes_fail(self): def is_str(v): return isinstance(v, str) counter = Fake("counter").expects("set_name").with_args( arg.passes_test(is_str)) counter.set_name(25)
def test_passes_fail(self): counter = Fake("counter").expects("set_name").with_args(arg.isinstance(str)) counter.set_name(25)
def test_passes_fail(self): def is_str(v): return isinstance(v,str) counter = Fake("counter").expects("set_name").with_args(arg.passes_test(is_str)) counter.set_name(25)