mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -525,8 +525,9 @@ class EventsRegisterTest(ZulipTestCase):
 | 
				
			|||||||
        after = ujson.dumps(hybrid_state)
 | 
					        after = ujson.dumps(hybrid_state)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if state_change_expected:
 | 
					        if state_change_expected:
 | 
				
			||||||
            if before == after:
 | 
					            if before == after:  # nocoverage
 | 
				
			||||||
                print(events)  # nocoverage
 | 
					                print(ujson.dumps(initial_state, indent=2))
 | 
				
			||||||
 | 
					                print(events)
 | 
				
			||||||
                raise AssertionError('Test does not exercise enough code -- events do not change state.')
 | 
					                raise AssertionError('Test does not exercise enough code -- events do not change state.')
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user