Match the position of the reverse-search match in the prompt

This commit is contained in:
Anthony Sottile
2020-01-07 17:31:41 -08:00
parent 817b542861
commit f1e8bcca3d
4 changed files with 31 additions and 15 deletions

View File

@@ -120,6 +120,14 @@ class PrintsErrorRunner(Runner):
# this is a bit of a hack, the in-process fake defers all execution
callback()
@contextlib.contextmanager
def on_error(self):
try:
yield
except AssertionError: # pragma: no cover (only on failure)
self.screenshot()
raise
@contextlib.contextmanager
def and_exit(h):