mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
UnitTests
* Taskd and Taskw classes for testing are now available * Testing of server and client can now be performed. * The newer test wrappers will eventually replace the BaseTest class
This commit is contained in:
parent
733561863e
commit
715a414abd
4 changed files with 318 additions and 17 deletions
20
test/basetest/exceptions.py
Normal file
20
test/basetest/exceptions.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
class CommandError(Exception):
|
||||
def __init__(self, cmd, code, out, err, msg=None):
|
||||
if msg is None:
|
||||
self.msg = ("Command '{0}' finished with unexpected exit code "
|
||||
"'{1}':\nStdout: '{2}'\nStderr: '{3}'")
|
||||
else:
|
||||
self.msg = msg
|
||||
|
||||
self.cmd = cmd
|
||||
self.out = out
|
||||
self.err = err
|
||||
self.code = code
|
||||
|
||||
def __str__(self):
|
||||
return self.msg.format(self.cmd, self.code, self.out, self.err)
|
||||
|
||||
# vim: ai sts=4 et sw=4
|
Loading…
Add table
Add a link
Reference in a new issue