mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unittest - default to not merging stdout/stderr during tests
* Tests will now check that stderr is used for errors * Tests were adjusted to reflect the API change
This commit is contained in:
parent
c9102fd79c
commit
efdb31fb90
4 changed files with 22 additions and 18 deletions
|
@ -3,11 +3,12 @@ import signal
|
|||
|
||||
|
||||
class CommandError(Exception):
|
||||
def __init__(self, cmd, code, out, err, msg=None):
|
||||
def __init__(self, cmd, code, out, err=None, msg=None):
|
||||
if msg is None:
|
||||
msg_suffix = (
|
||||
"\n*** Start STDOUT ***\n{2}\n*** End STDOUT ***\n"
|
||||
"\n*** Start STDERR ***\n{3}\n*** End STDERR ***\n"
|
||||
msg_suffix = "\n*** Start STDOUT ***\n{2}\n*** End STDOUT ***\n"
|
||||
if err is not None:
|
||||
msg_suffix += (
|
||||
"\n*** Start STDERR ***\n{3}\n*** End STDERR ***\n"
|
||||
)
|
||||
if code == -signal.SIGABRT:
|
||||
self.msg = ("Command '{0}' was aborted, likely due to not "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue