def assert_samelines(testcase, text1, text2, msg=None):
 testcase.assertEqual(text1.splitlines(), text2.splitlines(), msg)

def assert_samelines ( testcase , text1 , text2 , msg = None ) : testcase . assertEqual ( text1 . splitlines ( ) , text2 . splitlines ( ) , msg )
asserts text1 and text2 have the same lines .