In [51]:
from battle_tested import fuzz, battle_tested
In [52]:
def add_to_hello(a):
return 'hello '+a
add_to_hello('world')
Out[52]:
In [53]:
fuzz(add_to_hello, seconds=1, keep_testing=True)
In [54]:
def add_to_hello_with_format(a):
return 'hello {}'.format(a)
add_to_hello_with_format('world')
Out[54]:
In [55]:
fuzz(add_to_hello_with_format, seconds=1, keep_testing=True)
In [56]:
def count(a):
return len(a)
count('hello')
Out[56]:
In [57]:
fuzz(count, seconds=1, keep_testing=True)
In [ ]: