mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unittest - Enhanced support for testing hooks (wip)
* It is now possible to test: * Hook Input/Output on STDIN/STDOUT channels * Exit code of hook script * Execution count (how many times the hook was executed) * Timestamp execution (when was the hook executed - milisec resolution)
This commit is contained in:
parent
9ea61e25e8
commit
d261a38d17
9 changed files with 569 additions and 141 deletions
|
@ -8,7 +8,7 @@ import atexit
|
|||
from time import sleep
|
||||
from subprocess import Popen
|
||||
from .utils import (find_unused_port, release_port, port_used, run_cmd_wait,
|
||||
which, parse_datafile, CURRENT_DIR, binary_location)
|
||||
which, parse_datafile, DEFAULT_CERT_PATH, binary_location)
|
||||
from .exceptions import CommandError
|
||||
|
||||
try:
|
||||
|
@ -16,11 +16,6 @@ try:
|
|||
except ImportError:
|
||||
DEVNULL = open(os.devnull, 'w')
|
||||
|
||||
# Directory relative to basetest module location
|
||||
DEFAULT_CERT_PATH = os.path.abspath(
|
||||
os.path.join(CURRENT_DIR, "..", "test_certs")
|
||||
)
|
||||
|
||||
|
||||
class Taskd(object):
|
||||
"""Manage a taskd instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue