##// END OF EJS Templates
Put information in failure message for mismatched # lines in irunner.
Thomas Kluyver -
Show More
@@ -33,10 +33,15 b' class RunnerTestCase(unittest.TestCase):'
33 out_l = [l for l in out.splitlines() if l and not l.isspace()]
33 out_l = [l for l in out.splitlines() if l and not l.isspace()]
34 mismatch = 0
34 mismatch = 0
35 if len(output_l) != len(out_l):
35 if len(output_l) != len(out_l):
36 print "\n".join(output_l)
36 message = ("Mismatch in number of lines\n\n"
37 print "==================="
37 "Expected:\n"
38 print "\n".join(out_l)
38 "~~~~~~~~~\n"
39 self.fail('mismatch in number of lines')
39 "%s\n\n"
40 "Got:\n"
41 "~~~~~~~~~\n"
42 "%s"
43 ) % ("\n".join(output_l), "\n".join(out_l))
44 self.fail(message)
40 for n in range(len(output_l)):
45 for n in range(len(output_l)):
41 # Do a line-by-line comparison
46 # Do a line-by-line comparison
42 ol1 = output_l[n].strip()
47 ol1 = output_l[n].strip()
General Comments 0
You need to be logged in to leave comments. Login now