Skip to content

Commit

Permalink
Improve shell errors handling (#121)
Browse files Browse the repository at this point in the history
Improve shell errors reporting, so that vroom prints the actual shell errors.
  • Loading branch information
snu5mumr1k committed Sep 3, 2021
1 parent 98a9077 commit abd0e4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vroom/shell.py
Expand Up @@ -285,15 +285,16 @@ def __str__(self):
return out.rstrip('\n')


class FakeShellNotWorking(Exception):
class FakeShellNotWorking(vroom.test.Failure):
"""Called when the fake shell is not working."""

def __init__(self, errors):
self.shell_errors = errors
super(FakeShellNotWorking, self).__init__()

def __str__(self):
return 'The fake shell is not working as anticipated.'
errors_description = '\n'.join(list(map(str, self.shell_errors)))
return 'The fake shell is not working as anticipated:\n' + errors_description


class FakeShellFailure(vroom.test.Failure):
Expand Down

0 comments on commit abd0e4a

Please sign in to comment.