Skip to content

Commit

Permalink
verbose enables the pretty-printing of the whole shrink history
Browse files Browse the repository at this point in the history
Davide Del Vento committed Sep 19, 2014
1 parent 6e67603 commit 2530902
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qc/__init__.py
Original file line number Diff line number Diff line change
@@ -116,6 +116,9 @@ def call_and_shrink(f, tryshrink, seed, custom_shrink, *inargs, **random_kwargs)
for s in custom_shrink(random_kwargs[k]):
shrinked_kwargs = random_kwargs.copy()
shrinked_kwargs[k] = s
if forall.verbose or os.environ.has_key('QC_VERBOSE'):
from pprint import pprint
pprint(random_kwargs)
call_and_shrink(f, tryshrink, seed, custom_shrink, *inargs, **shrinked_kwargs)
if sys.version_info[0] < 3:
raise QCAssertionError(e, str(random_kwargs) +
@@ -139,7 +142,7 @@ def wrapped(*inargs, **inkwargs):
for (name, gen) in kwargs.iteritems()))
if forall.verbose or os.environ.has_key('QC_VERBOSE'):
from pprint import pprint
pprint(random_kwargs)
pprint("Shrink history:")
random_kwargs.update(**inkwargs)
call_and_shrink(f, shrink, seed, custom_shrink, *inargs, **random_kwargs)
if forall.printsummary:

0 comments on commit 2530902

Please sign in to comment.