enumerate(zip(log_reader, expected_contents.splitlines())):
if re.match(r'\d{1,2}:\d{2}:\d{2}:\d{3}\s+', actual_line):
cmp_line = actual_line[13:].rstrip()
- elif re.match(r'\s*File ".+", line \d+, in .+', actual_line):
+ elif re.match(r'\s*File ".+", line \d+, in .+', actual_line) \
+ or re.match(r'\s+~\^~\s*', actual_line):
cmp_line = ' TRACEBACK LINE REPLACED'
else:
cmp_line = actual_line.rstrip()
' impossible_result = 1/0\n' \
'ZeroDivisionError: division by zero\n' \
'info| done testing [regular levelname=INFO]\n'
+ # will have to add a ' TRACEBACK LINE REPLACED\n' above in future python version
self.check_expected_contents(expected_contents)
def test_get_logger(self):