Tests - Finer control on which binaries to look for on PATH

* It is now possible to control whether taskw and/or taskd are looked up
on the PATH by setting TASK_USE_PATH/TASKD_USE_PATH to "1"
This commit is contained in:
Renato Alves
2015-03-03 01:46:53 +00:00
parent 23d4e2b3c9
commit 180c382de2
3 changed files with 24 additions and 8 deletions

View File

@@ -5,8 +5,8 @@ import tempfile
import shutil
import atexit
import unittest
from .utils import (run_cmd_wait, run_cmd_wait_nofail, which, binary_location,
)
from .utils import (run_cmd_wait, run_cmd_wait_nofail, which,
task_binary_location)
from .exceptions import CommandError
from .hooks import Hooks
@@ -22,7 +22,7 @@ class Task(object):
A taskw client should not be used after being destroyed.
"""
DEFAULT_TASK = binary_location("task")
DEFAULT_TASK = task_binary_location()
def __init__(self, taskd=None, taskw=DEFAULT_TASK):
"""Initialize a Task warrior (client) that can interact with a taskd