Add more test diagnostic output for expectation testing.

This commit is contained in:
Pavel Minaev 2018-10-14 18:19:05 -07:00
parent 07f45e2922
commit a43bb4f255

View file

@ -190,9 +190,23 @@ class Timeline(object):
# First time wait_until() calls us, we have to check the whole timeline.
# On subsequent calls, we only need to check the newly added occurrence.
if check_past:
if explain:
print(
colors.LIGHT_MAGENTA + 'Testing ' + colors.RESET +
colors.color_repr(expectation) +
colors.LIGHT_MAGENTA + ' against timeline up to and including ' + colors.RESET +
colors.color_repr(self.last)
)
reasons.update(expectation.test_at_or_before(self.last) or {})
del check_past[:]
else:
if explain:
print(
colors.LIGHT_MAGENTA + 'Testing ' + colors.RESET +
colors.color_repr(expectation) +
colors.LIGHT_MAGENTA + ' against ' + colors.RESET +
colors.color_repr(self.last)
)
reasons.update(expectation.test_at(self.last) or {})
if reasons: