Introduction

Documentation for library excepts.

Keywords

Documentation

Return a list of exceptions that were not in the blacklist.

Each exception found is compared against all the patterns in the whitelist.

:return list _fail: list of exceptions not in the whitelist

Arguments

lines

Documentation

Create a map of exceptions that also has a list of warnings and errors preceeding the exception to use as context.

The lines are parsed to create a list where all lines related to a timestamp are aggregated. Timestamped lines with exception (case insensitive) are copied to the exception map keyed to the index of the timestamp line. Each exception value also has a list containing WARN and ERROR lines proceeding the exception.

:param list lines: :return OrderedDict _ex_map: map of exceptions

Arguments

lines

Documentation

Return a list of exceptions not in the whitelist for the given lines.

:param list lines: list of lines from a log :return list, list: one list of exceptions not in the whitelist, and a second with matching issues

Arguments

testname filename mode
= a+

Documentation

Write the exceptions map to a file under the testname header. The output will include all lines in the exception itself as well as any previous contextual warning or error lines. The output will be appended or overwritten depending on the mode parameter. It is assumed that the caller has called verify_exceptions() earlier to populate the exceptions map, otherwise only the testname and header will be printed to the file.

:param str testname: The name of the test :param str filename: The file to open for writing :param str mode: Append (a+) or overwrite (w+)

excepts

image/svg+xml