mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Tests: Add simpler self.t("add foo +bar") syntax
This commit is contained in:
parent
1e31df3c7a
commit
f6e04585ae
1 changed files with 11 additions and 0 deletions
|
@ -167,6 +167,17 @@ class Task(object):
|
|||
"""
|
||||
# Create a copy of the command
|
||||
command = self._command[:]
|
||||
|
||||
# Enable nicer-looking calls by allowing plain strings
|
||||
try:
|
||||
# Python 2.x
|
||||
if isinstance(args, basestring):
|
||||
args = args.split()
|
||||
except NameError:
|
||||
# Python 3.x
|
||||
if isinstance(args, str):
|
||||
args = args.split()
|
||||
|
||||
command.extend(args)
|
||||
|
||||
output = run_cmd_wait_nofail(command, input,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue