Extend and improve failure logging

Add the ability to show the intention, result,
and state of predecessors of the atom that has failed
so that more contextual information can be shown in the
logs that are written.

Change-Id: Ic77c0d4e94a147e54da74976c1d148aef82eccb3
This commit is contained in:
Joshua Harlow
2015-07-26 21:19:22 -07:00
parent b1c22dc2e2
commit 344b1c803b
4 changed files with 215 additions and 43 deletions

View File

@@ -60,6 +60,14 @@ class StrEnum(str, enum.Enum):
return super(StrEnum, cls).__new__(cls, *args, **kwargs)
class StringIO(six.StringIO):
"""String buffer with some small additions."""
def write_nl(self, value, linesep=os.linesep):
self.write(value)
self.write(linesep)
def match_type(obj, matchers):
"""Matches a given object using the given matchers list/iterable.