Permalink
Browse files

execute_bear: Improve ``AssertionError`` message

Improve AssertionError message so if ``msg`` is maybe really empty,
we don't have a superfluous ``\n``.

Closes #4418
  • Loading branch information...
yash-nisar committed Jun 27, 2017
1 parent 2941039 commit 0edf04029b60877395c34b9c22599423df165e55
Showing with 1 addition and 1 deletion.
  1. +1 −1 coalib/testing/LocalBearTestHelper.py
@@ -22,7 +22,7 @@ def execute_bear(bear, *args, **kwargs):
msg = []
while not bear.message_queue.empty():
msg.append(bear.message_queue.get().message)
raise AssertionError(str(err) + ' \n' + '\n'.join(msg))
raise AssertionError(str(err) + ''.join('\n' + m for m in msg))
return list(bear_output_generator)

0 comments on commit 0edf040

Please sign in to comment.