Do not print the whole screen unles something went wrong

This commit is contained in:
ZyX 2015-01-16 22:50:36 +03:00
parent c43bd06bd6
commit 44273f299b

View File

@ -138,6 +138,9 @@ def main():
for key, text in expected_result for key, text in expected_result
)) ))
print(shesc_expected_result) print(shesc_expected_result)
if result == expected_result:
return True
else:
print('Screen:') print('Screen:')
screen = [] screen = []
for i in range(rows): for i in range(rows):
@ -153,9 +156,6 @@ def main():
)) ))
for line in screen for line in screen
)) ))
if result == expected_result:
return True
else:
a = shesc_result.replace('\x1b', '\\e') + '\n' a = shesc_result.replace('\x1b', '\\e') + '\n'
b = shesc_expected_result.replace('\x1b', '\\e') + '\n' b = shesc_expected_result.replace('\x1b', '\\e') + '\n'
print('_' * 80) print('_' * 80)