From 847758e822811fe0f6ddda5eadfae9b24dee8fbc Mon Sep 17 00:00:00 2001 From: Stu Hood Date: Fri, 31 May 2019 18:18:12 -0700 Subject: [PATCH] Fix invalid type checks. --- tests/python/pants_test/pants_run_integration_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/python/pants_test/pants_run_integration_test.py b/tests/python/pants_test/pants_run_integration_test.py index 2daddfc79b2..4aa7853fe55 100644 --- a/tests/python/pants_test/pants_run_integration_test.py +++ b/tests/python/pants_test/pants_run_integration_test.py @@ -23,7 +23,7 @@ from pants.subsystem.subsystem import Subsystem from pants.util.contextutil import environment_as, pushd, temporary_dir from pants.util.dirutil import fast_relpath, safe_mkdir, safe_mkdir_for, safe_open -from pants.util.objects import Exactly, datatype, string_list, string_type +from pants.util.objects import Exactly, datatype, string_type from pants.util.osutil import IntegerForPid from pants.util.process_handler import SubprocessProcessHandler, subprocess from pants.util.py2_compat import configparser @@ -32,7 +32,8 @@ class PantsResult(datatype([ - ('command', string_list), + # NB: May be either a string list or string (in the case of `shell=True`). + 'command', ('returncode', int), ('stdout_data', string_type), ('stderr_data', string_type), @@ -43,7 +44,8 @@ class PantsResult(datatype([ class PantsJoinHandle(datatype([ - ('command', string_list), + # NB: May be either a string list or string (in the case of `shell=True`). + 'command', 'process', ('workdir', string_type), ])): @@ -385,7 +387,6 @@ def run_pants(self, command, config=None, stdin_data=None, extra_env=None, clean :param list command: A list of command line arguments coming after `./pants`. :param config: Optional data for a generated ini file. A map of -> map of key -> value. If order in the ini file matters, this should be an OrderedDict. - # TODO: ??? :param kwargs: Extra keyword args to pass to `subprocess.Popen`. :returns a PantsResult instance. """ @@ -619,7 +620,6 @@ def do_command(self, *args, **kwargs): """Wrapper around run_pants method. :param args: command line arguments used to run pants - # TODO: ??? :return: a PantsResult object """ cmd = list(args)