Tests: Add simpler self.t("add foo +bar") syntax

This commit is contained in:
Wilhelm Schuermann 2015-05-05 20:26:39 +02:00
parent 1e31df3c7a
commit f6e04585ae

View file

@ -167,6 +167,17 @@ class Task(object):
""" """
# Create a copy of the command # Create a copy of the command
command = self._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) command.extend(args)
output = run_cmd_wait_nofail(command, input, output = run_cmd_wait_nofail(command, input,