equal
deleted
inserted
replaced
49 lines.append(text[i:n+1]) |
49 lines.append(text[i:n+1]) |
50 i = n + 1 |
50 i = n + 1 |
51 |
51 |
52 def show_diff(expected, output): |
52 def show_diff(expected, output): |
53 for line in difflib.unified_diff(expected, output, |
53 for line in difflib.unified_diff(expected, output, |
54 "Expected output", "Test output", lineterm=''): |
54 "Expected output", "Test output"): |
55 sys.stdout.write(line) |
55 sys.stdout.write(line) |
56 |
56 |
57 def find_program(program): |
57 def find_program(program): |
58 """Search PATH for a executable program""" |
58 """Search PATH for a executable program""" |
59 for p in os.environ.get('PATH', os.defpath).split(os.pathsep): |
59 for p in os.environ.get('PATH', os.defpath).split(os.pathsep): |