test_events: Print out the state when it hasn't changed.

This is often a part of what one will want when debugging.
This commit is contained in:
Tim Abbott 2019-05-08 17:38:29 -07:00
parent 18a424be79
commit 8a2057e3cf
1 changed files with 3 additions and 2 deletions

View File

@ -525,8 +525,9 @@ class EventsRegisterTest(ZulipTestCase):
after = ujson.dumps(hybrid_state)
if state_change_expected:
if before == after:
print(events) # nocoverage
if before == after: # nocoverage
print(ujson.dumps(initial_state, indent=2))
print(events)
raise AssertionError('Test does not exercise enough code -- events do not change state.')
else:
try: