comparison tests/test_workers.py @ 345:5732edbfae30

Use python 3.4 compatible syntax Remove the need of circular imports between workers and command_line_util
author Amine Sehili <amine.sehili@gmail.com>
date Mon, 11 Nov 2019 09:38:47 +0100
parents 9f17aa9a4018
children 323d59b404a2
comparison
equal deleted inserted replaced
344:deb4bbed0ecd 345:5732edbfae30
241 241
242 # Assert PrintWorker ran as expected 242 # Assert PrintWorker ran as expected
243 expected_print_calls = [ 243 expected_print_calls = [
244 call( 244 call(
245 "[{}] {:.3f} {:.3f}, dur: {:.3f}".format( 245 "[{}] {:.3f} {:.3f}, dur: {:.3f}".format(
246 i, *exp, exp[1] - exp[0] 246 i, exp[0], exp[1], exp[1] - exp[0]
247 ) 247 )
248 ) 248 )
249 for i, exp in enumerate(self.expected, 1) 249 for i, exp in enumerate(self.expected, 1)
250 ] 250 ]
251 self.assertEqual(patched_print.mock_calls, expected_print_calls) 251 self.assertEqual(patched_print.mock_calls, expected_print_calls)