diff --git a/src/python/pants/testinfra/BUILD b/src/python/pants/testutils/BUILD similarity index 77% rename from src/python/pants/testinfra/BUILD rename to src/python/pants/testutils/BUILD index be52b650c494..9429e6a39188 100644 --- a/src/python/pants/testinfra/BUILD +++ b/src/python/pants/testutils/BUILD @@ -2,22 +2,20 @@ # Licensed under the Apache License, Version 2.0 (see LICENSE). python_library( - name='test_infra', + name='testutils_wheel', dependencies=[ ':int-test-for-export', ':test_base', - 'src/python/pants/testinfra/jvm:jar_task_test_base', - 'src/python/pants/testinfra/jvm:nailgun_task_test_base', - 'src/python/pants/testinfra/jvm:jvm_tool_task_test_base', - 'src/python/pants/testinfra/engine:engine_test_base', - 'src/python/pants/testinfra/subsystem', + 'src/python/pants/testutils/jvm:jar_task_test_base', + 'src/python/pants/testutils/jvm:nailgun_task_test_base', + 'src/python/pants/testutils/jvm:jvm_tool_task_test_base', + 'src/python/pants/testutils/engine:engine_test_base', + 'src/python/pants/testutils/subsystem', ], - # TODO(???): Once we remove `pants_test:testinfra`, reclaim the wheel name - # `pantsbuiuld.pants.testinfra`. We let that keep the ideal name for backwards compatibility. provides=pants_setup_py( - name='pantsbuild.pants.testinfra.new_namespace', + name='pantsbuild.pants.testutils', description='Test support for writing pants plugins.', - namespace_packages=['pants.testinfra'], + namespace_packages=['pants.testutils'], additional_classifiers=[ 'Topic :: Software Development :: Testing', ] @@ -39,7 +37,7 @@ python_library( 'src/python/pants/base:exiter', 'src/python/pants/fs', 'src/python/pants/subsystem', - 'src/python/pants/testinfra/utils:file_test_util', + 'src/python/pants/testutils/utils:file_test_util', 'src/python/pants/util:contextutil', 'src/python/pants/util:dirutil', 'src/python/pants/util:osutil', @@ -76,10 +74,10 @@ python_library( 'src/python/pants/source', 'src/python/pants/subsystem', 'src/python/pants/task', - 'src/python/pants/testinfra/base:context_utils', - 'src/python/pants/testinfra/engine:util', - 'src/python/pants/testinfra/option', - 'src/python/pants/testinfra/subsystem', + 'src/python/pants/testutils/base:context_utils', + 'src/python/pants/testutils/engine:util', + 'src/python/pants/testutils/option', + 'src/python/pants/testutils/subsystem', 'src/python/pants/util:collections', 'src/python/pants/util:contextutil', 'src/python/pants/util:dirutil', diff --git a/src/python/pants/testinfra/__init__.py b/src/python/pants/testutils/__init__.py similarity index 100% rename from src/python/pants/testinfra/__init__.py rename to src/python/pants/testutils/__init__.py diff --git a/src/python/pants/testinfra/base/BUILD b/src/python/pants/testutils/base/BUILD similarity index 100% rename from src/python/pants/testinfra/base/BUILD rename to src/python/pants/testutils/base/BUILD diff --git a/src/python/pants/testinfra/base/__init__.py b/src/python/pants/testutils/base/__init__.py similarity index 100% rename from src/python/pants/testinfra/base/__init__.py rename to src/python/pants/testutils/base/__init__.py diff --git a/src/python/pants/testinfra/base/context_utils.py b/src/python/pants/testutils/base/context_utils.py similarity index 100% rename from src/python/pants/testinfra/base/context_utils.py rename to src/python/pants/testutils/base/context_utils.py diff --git a/src/python/pants/testinfra/console_rule_test_base.py b/src/python/pants/testutils/console_rule_test_base.py similarity index 99% rename from src/python/pants/testinfra/console_rule_test_base.py rename to src/python/pants/testutils/console_rule_test_base.py index 5a7ba3a897af..3238d5594ea8 100644 --- a/src/python/pants/testinfra/console_rule_test_base.py +++ b/src/python/pants/testutils/console_rule_test_base.py @@ -11,7 +11,7 @@ from pants.init.options_initializer import BuildConfigInitializer from pants.init.target_roots_calculator import TargetRootsCalculator from pants.option.options_bootstrapper import OptionsBootstrapper -from pants.testinfra.test_base import TestBase +from pants.testutils.test_base import TestBase from pants.util.meta import classproperty diff --git a/src/python/pants/testinfra/engine/BUILD b/src/python/pants/testutils/engine/BUILD similarity index 94% rename from src/python/pants/testinfra/engine/BUILD rename to src/python/pants/testutils/engine/BUILD index b43947890b63..85deb47eac43 100644 --- a/src/python/pants/testinfra/engine/BUILD +++ b/src/python/pants/testutils/engine/BUILD @@ -7,7 +7,7 @@ python_library( dependencies = [ 'src/python/pants/goal', 'src/python/pants/goal:task_registrar', - 'src/python/pants/testinfra:test_base', + 'src/python/pants/testutils:test_base', ] ) diff --git a/src/python/pants/testinfra/engine/__init__.py b/src/python/pants/testutils/engine/__init__.py similarity index 100% rename from src/python/pants/testinfra/engine/__init__.py rename to src/python/pants/testutils/engine/__init__.py diff --git a/src/python/pants/testinfra/engine/base_engine_test.py b/src/python/pants/testutils/engine/base_engine_test.py similarity index 97% rename from src/python/pants/testinfra/engine/base_engine_test.py rename to src/python/pants/testutils/engine/base_engine_test.py index 73bc90b79cd6..ef483a8e5fa5 100644 --- a/src/python/pants/testinfra/engine/base_engine_test.py +++ b/src/python/pants/testutils/engine/base_engine_test.py @@ -3,7 +3,7 @@ from pants.goal.goal import Goal from pants.goal.task_registrar import TaskRegistrar -from pants.testinfra.test_base import TestBase +from pants.testutils.test_base import TestBase class EngineTestBase(TestBase): diff --git a/src/python/pants/testinfra/engine/util.py b/src/python/pants/testutils/engine/util.py similarity index 100% rename from src/python/pants/testinfra/engine/util.py rename to src/python/pants/testutils/engine/util.py diff --git a/src/python/pants/testinfra/interpreter_selection_utils.py b/src/python/pants/testutils/interpreter_selection_utils.py similarity index 100% rename from src/python/pants/testinfra/interpreter_selection_utils.py rename to src/python/pants/testutils/interpreter_selection_utils.py diff --git a/src/python/pants/testinfra/jvm/BUILD b/src/python/pants/testutils/jvm/BUILD similarity index 93% rename from src/python/pants/testinfra/jvm/BUILD rename to src/python/pants/testutils/jvm/BUILD index 1771d1ee4a58..a674c622e558 100644 --- a/src/python/pants/testinfra/jvm/BUILD +++ b/src/python/pants/testutils/jvm/BUILD @@ -43,8 +43,8 @@ python_library( sources=['jvm_task_test_base.py'], dependencies=[ 'src/python/pants/backend/jvm/tasks:classpath_products', - 'src/python/pants/testinfra/subsystem', - 'src/python/pants/testinfra:task_test_base', + 'src/python/pants/testutils/subsystem', + 'src/python/pants/testutils:task_test_base', 'src/python/pants/util:dirutil', ], ) diff --git a/src/python/pants/testinfra/jvm/__init__.py b/src/python/pants/testutils/jvm/__init__.py similarity index 100% rename from src/python/pants/testinfra/jvm/__init__.py rename to src/python/pants/testutils/jvm/__init__.py diff --git a/src/python/pants/testinfra/jvm/jar_task_test_base.py b/src/python/pants/testutils/jvm/jar_task_test_base.py similarity index 81% rename from src/python/pants/testinfra/jvm/jar_task_test_base.py rename to src/python/pants/testutils/jvm/jar_task_test_base.py index 47ea3e61c803..788c199b7f91 100644 --- a/src/python/pants/testinfra/jvm/jar_task_test_base.py +++ b/src/python/pants/testutils/jvm/jar_task_test_base.py @@ -1,7 +1,7 @@ # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.jvm.nailgun_task_test_base import NailgunTaskTestBase +from pants.testutils.jvm.nailgun_task_test_base import NailgunTaskTestBase class JarTaskTestBase(NailgunTaskTestBase): diff --git a/src/python/pants/testinfra/jvm/jvm_task_test_base.py b/src/python/pants/testutils/jvm/jvm_task_test_base.py similarity index 95% rename from src/python/pants/testinfra/jvm/jvm_task_test_base.py rename to src/python/pants/testutils/jvm/jvm_task_test_base.py index 758c6c37eea2..893b0eb64c69 100644 --- a/src/python/pants/testinfra/jvm/jvm_task_test_base.py +++ b/src/python/pants/testutils/jvm/jvm_task_test_base.py @@ -5,8 +5,8 @@ from pants.backend.jvm.subsystems.resolve_subsystem import JvmResolveSubsystem from pants.backend.jvm.tasks.classpath_products import ClasspathProducts -from pants.testinfra.subsystem.util import init_subsystem -from pants.testinfra.task_test_base import TaskTestBase +from pants.testutils.subsystem.util import init_subsystem +from pants.testutils.task_test_base import TaskTestBase from pants.util.dirutil import safe_file_dump, safe_mkdir, safe_mkdtemp diff --git a/src/python/pants/testinfra/jvm/jvm_tool_task_test_base.py b/src/python/pants/testutils/jvm/jvm_tool_task_test_base.py similarity index 98% rename from src/python/pants/testinfra/jvm/jvm_tool_task_test_base.py rename to src/python/pants/testutils/jvm/jvm_tool_task_test_base.py index 5bdb86d9099c..c3bcb1cd9a3b 100644 --- a/src/python/pants/testinfra/jvm/jvm_tool_task_test_base.py +++ b/src/python/pants/testutils/jvm/jvm_tool_task_test_base.py @@ -12,7 +12,7 @@ from pants.build_graph.build_file_aliases import BuildFileAliases from pants.build_graph.target import Target from pants.ivy.bootstrapper import Bootstrapper -from pants.testinfra.jvm.jvm_task_test_base import JvmTaskTestBase +from pants.testutils.jvm.jvm_task_test_base import JvmTaskTestBase from pants.util.dirutil import safe_mkdir diff --git a/src/python/pants/testinfra/jvm/nailgun_task_test_base.py b/src/python/pants/testutils/jvm/nailgun_task_test_base.py similarity index 92% rename from src/python/pants/testinfra/jvm/nailgun_task_test_base.py rename to src/python/pants/testutils/jvm/nailgun_task_test_base.py index e2db4b8a7e04..d10cd1b83702 100644 --- a/src/python/pants/testinfra/jvm/nailgun_task_test_base.py +++ b/src/python/pants/testutils/jvm/nailgun_task_test_base.py @@ -2,7 +2,7 @@ # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.jvm.tasks.nailgun_task import NailgunTask -from pants.testinfra.jvm.jvm_tool_task_test_base import JvmToolTaskTestBase +from pants.testutils.jvm.jvm_tool_task_test_base import JvmToolTaskTestBase class NailgunTaskTestBase(JvmToolTaskTestBase): diff --git a/src/python/pants/testinfra/option/BUILD b/src/python/pants/testutils/option/BUILD similarity index 100% rename from src/python/pants/testinfra/option/BUILD rename to src/python/pants/testutils/option/BUILD diff --git a/src/python/pants/testinfra/option/__init__.py b/src/python/pants/testutils/option/__init__.py similarity index 100% rename from src/python/pants/testinfra/option/__init__.py rename to src/python/pants/testutils/option/__init__.py diff --git a/src/python/pants/testinfra/option/fakes.py b/src/python/pants/testutils/option/fakes.py similarity index 100% rename from src/python/pants/testinfra/option/fakes.py rename to src/python/pants/testutils/option/fakes.py diff --git a/src/python/pants/testinfra/pants_run_integration_test.py b/src/python/pants/testutils/pants_run_integration_test.py similarity index 99% rename from src/python/pants/testinfra/pants_run_integration_test.py rename to src/python/pants/testutils/pants_run_integration_test.py index 1fcbf2fccf8d..2432c0f61f60 100644 --- a/src/python/pants/testinfra/pants_run_integration_test.py +++ b/src/python/pants/testutils/pants_run_integration_test.py @@ -22,7 +22,7 @@ from pants.base.exiter import PANTS_SUCCEEDED_EXIT_CODE from pants.fs.archive import ZIP from pants.subsystem.subsystem import Subsystem -from pants.testinfra.utils.file_test_util import check_symlinks, contains_exact_files +from pants.testutils.utils.file_test_util import check_symlinks, contains_exact_files 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.osutil import Pid diff --git a/src/python/pants/testinfra/subsystem/BUILD b/src/python/pants/testutils/subsystem/BUILD similarity index 83% rename from src/python/pants/testinfra/subsystem/BUILD rename to src/python/pants/testutils/subsystem/BUILD index d7fb312f7ef3..4849d0a2a8b7 100644 --- a/src/python/pants/testinfra/subsystem/BUILD +++ b/src/python/pants/testutils/subsystem/BUILD @@ -4,6 +4,6 @@ python_library( dependencies=[ 'src/python/pants/subsystem', - 'src/python/pants/testinfra/option', + 'src/python/pants/testutils/option', ], ) diff --git a/src/python/pants/testinfra/subsystem/__init__.py b/src/python/pants/testutils/subsystem/__init__.py similarity index 100% rename from src/python/pants/testinfra/subsystem/__init__.py rename to src/python/pants/testutils/subsystem/__init__.py diff --git a/src/python/pants/testinfra/subsystem/util.py b/src/python/pants/testutils/subsystem/util.py similarity index 98% rename from src/python/pants/testinfra/subsystem/util.py rename to src/python/pants/testutils/subsystem/util.py index 934515bab60c..bb9a9ae3a86d 100644 --- a/src/python/pants/testinfra/subsystem/util.py +++ b/src/python/pants/testutils/subsystem/util.py @@ -2,7 +2,7 @@ # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.subsystem.subsystem import Subsystem -from pants.testinfra.option.fakes import create_options_for_optionables +from pants.testutils.option.fakes import create_options_for_optionables def global_subsystem_instance(subsystem_type, options=None): diff --git a/src/python/pants/testinfra/task_test_base.py b/src/python/pants/testutils/task_test_base.py similarity index 100% rename from src/python/pants/testinfra/task_test_base.py rename to src/python/pants/testutils/task_test_base.py diff --git a/src/python/pants/testinfra/test_base.py b/src/python/pants/testutils/test_base.py similarity index 99% rename from src/python/pants/testinfra/test_base.py rename to src/python/pants/testutils/test_base.py index 6acd564dcef6..59156d1886a2 100644 --- a/src/python/pants/testinfra/test_base.py +++ b/src/python/pants/testutils/test_base.py @@ -30,10 +30,10 @@ from pants.source.source_root import SourceRootConfig from pants.subsystem.subsystem import Subsystem from pants.task.goal_options_mixin import GoalOptionsMixin -from pants.testinfra.base.context_utils import create_context_from_options -from pants.testinfra.engine.util import init_native -from pants.testinfra.option.fakes import create_options_for_optionables -from pants.testinfra.subsystem import util as subsystem_util +from pants.testutils.base.context_utils import create_context_from_options +from pants.testutils.engine.util import init_native +from pants.testutils.option.fakes import create_options_for_optionables +from pants.testutils.subsystem import util as subsystem_util from pants.util.collections import assert_single_element from pants.util.contextutil import temporary_dir from pants.util.dirutil import ( diff --git a/src/python/pants/testinfra/utils/BUILD b/src/python/pants/testutils/utils/BUILD similarity index 100% rename from src/python/pants/testinfra/utils/BUILD rename to src/python/pants/testutils/utils/BUILD diff --git a/src/python/pants/testinfra/utils/__init__.py b/src/python/pants/testutils/utils/__init__.py similarity index 100% rename from src/python/pants/testinfra/utils/__init__.py rename to src/python/pants/testutils/utils/__init__.py diff --git a/src/python/pants/testinfra/utils/file_test_util.py b/src/python/pants/testutils/utils/file_test_util.py similarity index 100% rename from src/python/pants/testinfra/utils/file_test_util.py rename to src/python/pants/testutils/utils/file_test_util.py diff --git a/src/python/pants/testinfra/utils/git_util.py b/src/python/pants/testutils/utils/git_util.py similarity index 100% rename from src/python/pants/testinfra/utils/git_util.py rename to src/python/pants/testutils/utils/git_util.py diff --git a/src/python/pants/testinfra/utils/mock_logger.py b/src/python/pants/testutils/utils/mock_logger.py similarity index 100% rename from src/python/pants/testinfra/utils/mock_logger.py rename to src/python/pants/testutils/utils/mock_logger.py diff --git a/src/python/pants/testinfra/utils/pexrc_util.py b/src/python/pants/testutils/utils/pexrc_util.py similarity index 100% rename from src/python/pants/testinfra/utils/pexrc_util.py rename to src/python/pants/testutils/utils/pexrc_util.py diff --git a/src/python/pants/testinfra/utils/process_test_util.py b/src/python/pants/testutils/utils/process_test_util.py similarity index 100% rename from src/python/pants/testinfra/utils/process_test_util.py rename to src/python/pants/testutils/utils/process_test_util.py diff --git a/tests/python/pants_test/BUILD b/tests/python/pants_test/BUILD index eeffef1eabed..706c87b0155f 100644 --- a/tests/python/pants_test/BUILD +++ b/tests/python/pants_test/BUILD @@ -30,7 +30,7 @@ python_library( name = 'int-test-for-export', sources = ['pants_run_integration_test.py'], dependencies = [ - 'src/python/pants/testinfra:int-test-for-export', + 'src/python/pants/testutils:int-test-for-export', ] ) @@ -38,7 +38,7 @@ target( name = 'int-test', dependencies=[ ':int-test-for-export', - 'src/python/pants/testinfra:int-test', + 'src/python/pants/testutils:int-test', ], ) @@ -46,7 +46,7 @@ python_library( name = 'test_base', sources = ['test_base.py'], dependencies = [ - 'src/python/pants/testinfra:test_base', + 'src/python/pants/testutils:test_base', ] ) @@ -54,7 +54,7 @@ python_library( name = 'console_rule_test_base', sources = ['console_rule_test_base.py'], dependencies = [ - 'src/python/pants/testinfra:console_rule_test_base', + 'src/python/pants/testutils:console_rule_test_base', ] ) @@ -63,7 +63,7 @@ python_library( name = 'task_test_base', sources = ['task_test_base.py'], dependencies = [ - 'src/python/pants/testinfra:task_test_base', + 'src/python/pants/testutils:task_test_base', ] ) @@ -71,7 +71,7 @@ python_library( name='interpreter_selection_utils', sources=['interpreter_selection_utils.py'], dependencies = [ - 'src/python/pants/testinfra:interpreter_selection_utils', + 'src/python/pants/testutils:interpreter_selection_utils', ] ) @@ -82,7 +82,7 @@ python_tests( 'src/python/pants/backend/jvm/subsystems:junit', 'src/python/pants/build_graph', 'src/python/pants/source', - 'src/python/pants/testinfra:test_base', - 'src/python/pants/testinfra/subsystem', + 'src/python/pants/testutils:test_base', + 'src/python/pants/testutils/subsystem', ] ) diff --git a/tests/python/pants_test/base/BUILD b/tests/python/pants_test/base/BUILD index c7ca37d2fa5c..644060a19d07 100644 --- a/tests/python/pants_test/base/BUILD +++ b/tests/python/pants_test/base/BUILD @@ -49,7 +49,7 @@ python_library( name = 'context_utils', sources = ['context_utils.py'], dependencies = [ - 'src/python/pants/testinfra/base:context_utils', + 'src/python/pants/testutils/base:context_utils', ] ) diff --git a/tests/python/pants_test/base/context_utils.py b/tests/python/pants_test/base/context_utils.py index 10242f72a1f9..aaa5a0cc224a 100644 --- a/tests/python/pants_test/base/context_utils.py +++ b/tests/python/pants_test/base/context_utils.py @@ -1,7 +1,7 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.base.context_utils import TestContext as TestContext -from pants.testinfra.base.context_utils import ( +from pants.testutils.base.context_utils import TestContext as TestContext # noqa +from pants.testutils.base.context_utils import ( create_context_from_options as create_context_from_options, -) +) # noqa diff --git a/tests/python/pants_test/console_rule_test_base.py b/tests/python/pants_test/console_rule_test_base.py index cda0275c25e0..9900496e1166 100644 --- a/tests/python/pants_test/console_rule_test_base.py +++ b/tests/python/pants_test/console_rule_test_base.py @@ -1,4 +1,4 @@ # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.console_rule_test_base import ConsoleRuleTestBase as ConsoleRuleTestBase +from pants.testutils.console_rule_test_base import ConsoleRuleTestBase as ConsoleRuleTestBase # noqa diff --git a/tests/python/pants_test/engine/BUILD b/tests/python/pants_test/engine/BUILD index ea3c4d076a2d..79113b1004b7 100644 --- a/tests/python/pants_test/engine/BUILD +++ b/tests/python/pants_test/engine/BUILD @@ -5,7 +5,7 @@ python_library( name = 'util', sources = ['util.py'], dependencies = [ - 'src/python/pants/testinfra/engine:util', + 'src/python/pants/testutils/engine:util', ], ) @@ -13,7 +13,7 @@ python_library( name = 'engine_test_base', sources = ['base_engine_test.py'], dependencies = [ - 'src/python/pants/testinfra/engine:engine_test_base', + 'src/python/pants/testutils/engine:engine_test_base', ] ) diff --git a/tests/python/pants_test/engine/base_engine_test.py b/tests/python/pants_test/engine/base_engine_test.py index f11759b6de25..2e7daeb46a9b 100644 --- a/tests/python/pants_test/engine/base_engine_test.py +++ b/tests/python/pants_test/engine/base_engine_test.py @@ -1,4 +1,4 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.engine.base_engine_test import EngineTestBase as EngineTestBase +from pants.testutils.engine.base_engine_test import EngineTestBase as EngineTestBase # noqa diff --git a/tests/python/pants_test/engine/util.py b/tests/python/pants_test/engine/util.py index 9e329a60df13..713b4835f64f 100644 --- a/tests/python/pants_test/engine/util.py +++ b/tests/python/pants_test/engine/util.py @@ -1,13 +1,13 @@ # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.engine.util import TARGET_TABLE as TARGET_TABLE -from pants.testinfra.engine.util import MockConsole as MockConsole -from pants.testinfra.engine.util import Target as Target -from pants.testinfra.engine.util import assert_equal_with_printing as assert_equal_with_printing -from pants.testinfra.engine.util import create_scheduler as create_scheduler -from pants.testinfra.engine.util import init_native as init_native -from pants.testinfra.engine.util import ( +from pants.testutils.engine.util import TARGET_TABLE as TARGET_TABLE # noqa +from pants.testutils.engine.util import MockConsole as MockConsole # noqa +from pants.testutils.engine.util import Target as Target # noqa +from pants.testutils.engine.util import assert_equal_with_printing as assert_equal_with_printing # noqa +from pants.testutils.engine.util import create_scheduler as create_scheduler # noqa +from pants.testutils.engine.util import init_native as init_native # noqa +from pants.testutils.engine.util import ( remove_locations_from_traceback as remove_locations_from_traceback, -) -from pants.testinfra.engine.util import run_rule as run_rule +) # noqa +from pants.testutils.engine.util import run_rule as run_rule # noqa diff --git a/tests/python/pants_test/interpreter_selection_utils.py b/tests/python/pants_test/interpreter_selection_utils.py index d88cd7941071..b2bed3e955ca 100644 --- a/tests/python/pants_test/interpreter_selection_utils.py +++ b/tests/python/pants_test/interpreter_selection_utils.py @@ -1,33 +1,33 @@ # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.interpreter_selection_utils import PY_2 as PY_2 -from pants.testinfra.interpreter_selection_utils import PY_3 as PY_3 -from pants.testinfra.interpreter_selection_utils import PY_27 as PY_27 -from pants.testinfra.interpreter_selection_utils import PY_36 as PY_36 -from pants.testinfra.interpreter_selection_utils import PY_37 as PY_37 -from pants.testinfra.interpreter_selection_utils import has_python_version as has_python_version -from pants.testinfra.interpreter_selection_utils import ( +from pants.testutils.interpreter_selection_utils import PY_2 as PY_2 # noqa +from pants.testutils.interpreter_selection_utils import PY_3 as PY_3 # noqa +from pants.testutils.interpreter_selection_utils import PY_27 as PY_27 # noqa +from pants.testutils.interpreter_selection_utils import PY_36 as PY_36 # noqa +from pants.testutils.interpreter_selection_utils import PY_37 as PY_37 # noqa +from pants.testutils.interpreter_selection_utils import has_python_version as has_python_version # noqa +from pants.testutils.interpreter_selection_utils import ( python_interpreter_path as python_interpreter_path, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_all_pythons_present as skip_unless_all_pythons_present, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_python3_present as skip_unless_python3_present, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_python27_and_python3_present as skip_unless_python27_and_python3_present, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_python27_and_python36_present as skip_unless_python27_and_python36_present, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_python27_present as skip_unless_python27_present, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_python36_and_python37_present as skip_unless_python36_and_python37_present, -) -from pants.testinfra.interpreter_selection_utils import ( +) # noqa +from pants.testutils.interpreter_selection_utils import ( skip_unless_python36_present as skip_unless_python36_present, -) +) # noqa diff --git a/tests/python/pants_test/jvm/BUILD b/tests/python/pants_test/jvm/BUILD index c12ea265b2d0..8a9d4d08e859 100644 --- a/tests/python/pants_test/jvm/BUILD +++ b/tests/python/pants_test/jvm/BUILD @@ -23,7 +23,7 @@ python_library( name='jvm_tool_task_test_base', sources=['jvm_tool_task_test_base.py'], dependencies=[ - 'src/python/pants/testinfra/jvm:jvm_tool_task_test_base', + 'src/python/pants/testutils/jvm:jvm_tool_task_test_base', ] ) @@ -31,7 +31,7 @@ python_library( name='nailgun_task_test_base', sources=['nailgun_task_test_base.py'], dependencies=[ - 'src/python/pants/testinfra/jvm:nailgun_task_test_base', + 'src/python/pants/testutils/jvm:nailgun_task_test_base', ] ) @@ -39,7 +39,7 @@ python_library( name='jar_task_test_base', sources=['jar_task_test_base.py'], dependencies=[ - 'src/python/pants/testinfra/jvm:jar_task_test_base', + 'src/python/pants/testutils/jvm:jar_task_test_base', ] ) @@ -47,6 +47,6 @@ python_library( name='jvm_task_test_base', sources=['jvm_task_test_base.py'], dependencies=[ - 'src/python/pants/testinfra/jvm:jvm_task_test_base', + 'src/python/pants/testutils/jvm:jvm_task_test_base', ] ) diff --git a/tests/python/pants_test/jvm/jar_task_test_base.py b/tests/python/pants_test/jvm/jar_task_test_base.py index c49a8acdc45c..95a140aaa90a 100644 --- a/tests/python/pants_test/jvm/jar_task_test_base.py +++ b/tests/python/pants_test/jvm/jar_task_test_base.py @@ -1,4 +1,4 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.jvm.jar_task_test_base import JarTaskTestBase as JarTaskTestBase +from pants.testutils.jvm.jar_task_test_base import JarTaskTestBase as JarTaskTestBase # noqa diff --git a/tests/python/pants_test/jvm/jvm_task_test_base.py b/tests/python/pants_test/jvm/jvm_task_test_base.py index fd69cc6baac1..19d562a30420 100644 --- a/tests/python/pants_test/jvm/jvm_task_test_base.py +++ b/tests/python/pants_test/jvm/jvm_task_test_base.py @@ -1,4 +1,4 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.jvm.jvm_task_test_base import JvmTaskTestBase as JvmTaskTestBase +from pants.testutils.jvm.jvm_task_test_base import JvmTaskTestBase as JvmTaskTestBase # noqa diff --git a/tests/python/pants_test/jvm/jvm_tool_task_test_base.py b/tests/python/pants_test/jvm/jvm_tool_task_test_base.py index 7a8ef2a4a913..eb0c028d0d74 100644 --- a/tests/python/pants_test/jvm/jvm_tool_task_test_base.py +++ b/tests/python/pants_test/jvm/jvm_tool_task_test_base.py @@ -1,4 +1,4 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.jvm.jvm_tool_task_test_base import JvmToolTaskTestBase as JvmToolTaskTestBase +from pants.testutils.jvm.jvm_tool_task_test_base import JvmToolTaskTestBase as JvmToolTaskTestBase # noqa diff --git a/tests/python/pants_test/jvm/nailgun_task_test_base.py b/tests/python/pants_test/jvm/nailgun_task_test_base.py index 622801246deb..8a9428d48033 100644 --- a/tests/python/pants_test/jvm/nailgun_task_test_base.py +++ b/tests/python/pants_test/jvm/nailgun_task_test_base.py @@ -1,4 +1,4 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.jvm.nailgun_task_test_base import NailgunTaskTestBase as NailgunTaskTestBase +from pants.testutils.jvm.nailgun_task_test_base import NailgunTaskTestBase as NailgunTaskTestBase # noqa diff --git a/tests/python/pants_test/option/util/BUILD b/tests/python/pants_test/option/util/BUILD index 52e4326ece1c..1310435dc31a 100644 --- a/tests/python/pants_test/option/util/BUILD +++ b/tests/python/pants_test/option/util/BUILD @@ -3,6 +3,6 @@ python_library( dependencies=[ - 'src/python/pants/testinfra/option' + 'src/python/pants/testutils/option' ], ) diff --git a/tests/python/pants_test/option/util/fakes.py b/tests/python/pants_test/option/util/fakes.py index 01a9abeaed26..d4518ed1409d 100644 --- a/tests/python/pants_test/option/util/fakes.py +++ b/tests/python/pants_test/option/util/fakes.py @@ -1,11 +1,11 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.option.fakes import _FakeOptionValues as _FakeOptionValues -from pants.testinfra.option.fakes import ( +from pants.testutils.option.fakes import _FakeOptionValues as _FakeOptionValues # noqa +from pants.testutils.option.fakes import ( _options_registration_function as _options_registration_function, -) -from pants.testinfra.option.fakes import create_options as create_options -from pants.testinfra.option.fakes import ( +) # noqa +from pants.testutils.option.fakes import create_options as create_options # noqa +from pants.testutils.option.fakes import ( create_options_for_optionables as create_options_for_optionables, -) +) # noqa diff --git a/tests/python/pants_test/pants_run_integration_test.py b/tests/python/pants_test/pants_run_integration_test.py index 30706c2706b2..fbfa3201a69e 100644 --- a/tests/python/pants_test/pants_run_integration_test.py +++ b/tests/python/pants_test/pants_run_integration_test.py @@ -1,13 +1,13 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.pants_run_integration_test import PantsJoinHandle as PantsJoinHandle -from pants.testinfra.pants_run_integration_test import PantsResult as PantsResult -from pants.testinfra.pants_run_integration_test import ( +from pants.testutils.pants_run_integration_test import PantsJoinHandle as PantsJoinHandle # noqa +from pants.testutils.pants_run_integration_test import PantsResult as PantsResult # noqa +from pants.testutils.pants_run_integration_test import ( PantsRunIntegrationTest as PantsRunIntegrationTest, -) -from pants.testinfra.pants_run_integration_test import ensure_cached as ensure_cached -from pants.testinfra.pants_run_integration_test import ensure_daemon as ensure_daemon -from pants.testinfra.pants_run_integration_test import ensure_resolver as ensure_resolver -from pants.testinfra.pants_run_integration_test import read_pantsd_log as read_pantsd_log -from pants.testinfra.pants_run_integration_test import render_logs as render_logs +) # noqa +from pants.testutils.pants_run_integration_test import ensure_cached as ensure_cached # noqa +from pants.testutils.pants_run_integration_test import ensure_daemon as ensure_daemon # noqa +from pants.testutils.pants_run_integration_test import ensure_resolver as ensure_resolver # noqa +from pants.testutils.pants_run_integration_test import read_pantsd_log as read_pantsd_log # noqa +from pants.testutils.pants_run_integration_test import render_logs as render_logs # noqa diff --git a/tests/python/pants_test/subsystem/BUILD b/tests/python/pants_test/subsystem/BUILD index 6330b7f3f432..35a92e7a7796 100644 --- a/tests/python/pants_test/subsystem/BUILD +++ b/tests/python/pants_test/subsystem/BUILD @@ -13,6 +13,6 @@ python_library( name='subsystem_utils', sources=['subsystem_util.py'], dependencies=[ - 'src/python/pants/testinfra/subsystem', + 'src/python/pants/testutils/subsystem', ], ) diff --git a/tests/python/pants_test/subsystem/subsystem_util.py b/tests/python/pants_test/subsystem/subsystem_util.py index a5dc7e7b516c..44f1be9ae56d 100644 --- a/tests/python/pants_test/subsystem/subsystem_util.py +++ b/tests/python/pants_test/subsystem/subsystem_util.py @@ -1,6 +1,6 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.subsystem.util import global_subsystem_instance as global_subsystem_instance -from pants.testinfra.subsystem.util import init_subsystem as init_subsystem -from pants.testinfra.subsystem.util import init_subsystems as init_subsystems +from pants.testutils.subsystem.util import global_subsystem_instance as global_subsystem_instance # noqa +from pants.testutils.subsystem.util import init_subsystem as init_subsystem # noqa +from pants.testutils.subsystem.util import init_subsystems as init_subsystems # noqa diff --git a/tests/python/pants_test/task_test_base.py b/tests/python/pants_test/task_test_base.py index f0985896ad92..2ad6b1f7cfe0 100644 --- a/tests/python/pants_test/task_test_base.py +++ b/tests/python/pants_test/task_test_base.py @@ -1,8 +1,8 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.task_test_base import ConsoleTaskTestBase as ConsoleTaskTestBase -from pants.testinfra.task_test_base import DeclarativeTaskTestMixin as DeclarativeTaskTestMixin -from pants.testinfra.task_test_base import TaskTestBase as TaskTestBase -from pants.testinfra.task_test_base import ensure_cached as ensure_cached -from pants.testinfra.task_test_base import is_exe as is_exe +from pants.testutils.task_test_base import ConsoleTaskTestBase as ConsoleTaskTestBase # noqa +from pants.testutils.task_test_base import DeclarativeTaskTestMixin as DeclarativeTaskTestMixin # noqa +from pants.testutils.task_test_base import TaskTestBase as TaskTestBase # noqa +from pants.testutils.task_test_base import ensure_cached as ensure_cached # noqa +from pants.testutils.task_test_base import is_exe as is_exe # noqa diff --git a/tests/python/pants_test/test_base.py b/tests/python/pants_test/test_base.py index b0438ceda97f..4bc9cf4e8303 100644 --- a/tests/python/pants_test/test_base.py +++ b/tests/python/pants_test/test_base.py @@ -1,5 +1,5 @@ # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.test_base import AbstractTestGenerator as AbstractTestGenerator -from pants.testinfra.test_base import TestBase as TestBase +from pants.testutils.test_base import AbstractTestGenerator as AbstractTestGenerator # noqa +from pants.testutils.test_base import TestBase as TestBase # noqa diff --git a/tests/python/pants_test/testutils/BUILD b/tests/python/pants_test/testutils/BUILD index ec6c7cbd69e5..f7aca7629049 100644 --- a/tests/python/pants_test/testutils/BUILD +++ b/tests/python/pants_test/testutils/BUILD @@ -5,7 +5,7 @@ python_library( name = 'mock_logger', sources = globs('mock_logger.py'), dependencies = [ - 'src/python/pants/testinfra/utils:mock_logger', + 'src/python/pants/testutils/utils:mock_logger', ], ) @@ -15,7 +15,7 @@ python_library( 'file_test_util.py', ], dependencies = [ - 'src/python/pants/testinfra/utils:file_test_util', + 'src/python/pants/testutils/utils:file_test_util', ], ) @@ -25,7 +25,7 @@ python_library( 'git_util.py', ], dependencies = [ - 'src/python/pants/testinfra/utils:git_util', + 'src/python/pants/testutils/utils:git_util', ], ) @@ -35,7 +35,7 @@ python_library( 'process_test_util.py', ], dependencies = [ - 'src/python/pants/testinfra/utils:process_test_util', + 'src/python/pants/testutils/utils:process_test_util', ], ) @@ -45,6 +45,6 @@ python_library( 'pexrc_util.py', ], dependencies = [ - 'src/python/pants/testinfra/utils:pexrc_util', + 'src/python/pants/testutils/utils:pexrc_util', ], ) diff --git a/tests/python/pants_test/testutils/file_test_util.py b/tests/python/pants_test/testutils/file_test_util.py index 4742fd38f64c..3dc4d8c075c1 100644 --- a/tests/python/pants_test/testutils/file_test_util.py +++ b/tests/python/pants_test/testutils/file_test_util.py @@ -1,7 +1,7 @@ # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.utils.file_test_util import check_file_content as check_file_content -from pants.testinfra.utils.file_test_util import check_symlinks as check_symlinks -from pants.testinfra.utils.file_test_util import contains_exact_files as contains_exact_files -from pants.testinfra.utils.file_test_util import exact_files as exact_files +from pants.testutils.utils.file_test_util import check_file_content as check_file_content # noqa +from pants.testutils.utils.file_test_util import check_symlinks as check_symlinks # noqa +from pants.testutils.utils.file_test_util import contains_exact_files as contains_exact_files # noqa +from pants.testutils.utils.file_test_util import exact_files as exact_files # noqa diff --git a/tests/python/pants_test/testutils/git_util.py b/tests/python/pants_test/testutils/git_util.py index a9b01b07bce1..2a30ad8de791 100644 --- a/tests/python/pants_test/testutils/git_util.py +++ b/tests/python/pants_test/testutils/git_util.py @@ -1,6 +1,6 @@ # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.utils.git_util import MIN_REQUIRED_GIT_VERSION as MIN_REQUIRED_GIT_VERSION -from pants.testinfra.utils.git_util import git_version as git_version -from pants.testinfra.utils.git_util import initialize_repo as initialize_repo +from pants.testutils.utils.git_util import MIN_REQUIRED_GIT_VERSION as MIN_REQUIRED_GIT_VERSION # noqa +from pants.testutils.utils.git_util import git_version as git_version # noqa +from pants.testutils.utils.git_util import initialize_repo as initialize_repo # noqa diff --git a/tests/python/pants_test/testutils/mock_logger.py b/tests/python/pants_test/testutils/mock_logger.py index 8036f11c09a3..7e9969226b5b 100644 --- a/tests/python/pants_test/testutils/mock_logger.py +++ b/tests/python/pants_test/testutils/mock_logger.py @@ -1,4 +1,4 @@ # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.utils.mock_logger import MockLogger as MockLogger +from pants.testutils.utils.mock_logger import MockLogger as MockLogger # noqa diff --git a/tests/python/pants_test/testutils/pexrc_util.py b/tests/python/pants_test/testutils/pexrc_util.py index 0c7ff82bee8d..f98ef70753ed 100644 --- a/tests/python/pants_test/testutils/pexrc_util.py +++ b/tests/python/pants_test/testutils/pexrc_util.py @@ -1,6 +1,6 @@ # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.utils.pexrc_util import ( +from pants.testutils.utils.pexrc_util import ( setup_pexrc_with_pex_python_path as setup_pexrc_with_pex_python_path, -) +) # noqa diff --git a/tests/python/pants_test/testutils/process_test_util.py b/tests/python/pants_test/testutils/process_test_util.py index 614dce9e68f8..d8b79b108570 100644 --- a/tests/python/pants_test/testutils/process_test_util.py +++ b/tests/python/pants_test/testutils/process_test_util.py @@ -1,14 +1,14 @@ # Copyright 2017 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). -from pants.testinfra.utils.process_test_util import ProcessStillRunning as ProcessStillRunning -from pants.testinfra.utils.process_test_util import ( +from pants.testutils.utils.process_test_util import ProcessStillRunning as ProcessStillRunning # noqa +from pants.testutils.utils.process_test_util import ( TrackedProcessesContext as TrackedProcessesContext, -) -from pants.testinfra.utils.process_test_util import _make_process_table as _make_process_table -from pants.testinfra.utils.process_test_util import ( +) # noqa +from pants.testutils.utils.process_test_util import _make_process_table as _make_process_table # noqa +from pants.testutils.utils.process_test_util import ( _safe_iter_matching_processes as _safe_iter_matching_processes, -) -from pants.testinfra.utils.process_test_util import ( +) # noqa +from pants.testutils.utils.process_test_util import ( no_lingering_process_by_command as no_lingering_process_by_command, -) +) # noqa