diff --git a/client/galaxy/scripts/mocha/tests/rules_dsl_spec.yml b/client/galaxy/scripts/mocha/tests/rules_dsl_spec.yml index 801fe01b06f..bb0210e9aa6 120000 --- a/client/galaxy/scripts/mocha/tests/rules_dsl_spec.yml +++ b/client/galaxy/scripts/mocha/tests/rules_dsl_spec.yml @@ -1 +1 @@ -../../../../../test/base/data/rules_dsl_spec.yml \ No newline at end of file +../../../../../lib/galaxy_test/base/data/rules_dsl_spec.yml \ No newline at end of file diff --git a/test/base/__init__.py b/lib/galaxy_test/__init__.py similarity index 100% rename from test/base/__init__.py rename to lib/galaxy_test/__init__.py diff --git a/lib/galaxy_test/base/__init__.py b/lib/galaxy_test/base/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/base/api_asserts.py b/lib/galaxy_test/base/api_asserts.py similarity index 100% rename from test/base/api_asserts.py rename to lib/galaxy_test/base/api_asserts.py diff --git a/test/base/api_util.py b/lib/galaxy_test/base/api_util.py similarity index 100% rename from test/base/api_util.py rename to lib/galaxy_test/base/api_util.py diff --git a/test/base/constants.py b/lib/galaxy_test/base/constants.py similarity index 100% rename from test/base/constants.py rename to lib/galaxy_test/base/constants.py diff --git a/test/base/data/rules_dsl_spec.yml b/lib/galaxy_test/base/data/rules_dsl_spec.yml similarity index 100% rename from test/base/data/rules_dsl_spec.yml rename to lib/galaxy_test/base/data/rules_dsl_spec.yml diff --git a/test/base/data/test_workflow_1.ga b/lib/galaxy_test/base/data/test_workflow_1.ga similarity index 100% rename from test/base/data/test_workflow_1.ga rename to lib/galaxy_test/base/data/test_workflow_1.ga diff --git a/test/base/data/test_workflow_2.ga b/lib/galaxy_test/base/data/test_workflow_2.ga similarity index 100% rename from test/base/data/test_workflow_2.ga rename to lib/galaxy_test/base/data/test_workflow_2.ga diff --git a/test/base/data/test_workflow_batch.ga b/lib/galaxy_test/base/data/test_workflow_batch.ga similarity index 100% rename from test/base/data/test_workflow_batch.ga rename to lib/galaxy_test/base/data/test_workflow_batch.ga diff --git a/test/base/data/test_workflow_map_reduce_pause.ga b/lib/galaxy_test/base/data/test_workflow_map_reduce_pause.ga similarity index 100% rename from test/base/data/test_workflow_map_reduce_pause.ga rename to lib/galaxy_test/base/data/test_workflow_map_reduce_pause.ga diff --git a/test/base/data/test_workflow_matching_lists.ga b/lib/galaxy_test/base/data/test_workflow_matching_lists.ga similarity index 100% rename from test/base/data/test_workflow_matching_lists.ga rename to lib/galaxy_test/base/data/test_workflow_matching_lists.ga diff --git a/test/base/data/test_workflow_missing_tool.ga b/lib/galaxy_test/base/data/test_workflow_missing_tool.ga similarity index 100% rename from test/base/data/test_workflow_missing_tool.ga rename to lib/galaxy_test/base/data/test_workflow_missing_tool.ga diff --git a/test/base/data/test_workflow_pause.ga b/lib/galaxy_test/base/data/test_workflow_pause.ga similarity index 100% rename from test/base/data/test_workflow_pause.ga rename to lib/galaxy_test/base/data/test_workflow_pause.ga diff --git a/test/base/data/test_workflow_topoambigouity.ga b/lib/galaxy_test/base/data/test_workflow_topoambigouity.ga similarity index 100% rename from test/base/data/test_workflow_topoambigouity.ga rename to lib/galaxy_test/base/data/test_workflow_topoambigouity.ga diff --git a/test/base/data/test_workflow_topoambigouity_auto_laidout.ga b/lib/galaxy_test/base/data/test_workflow_topoambigouity_auto_laidout.ga similarity index 100% rename from test/base/data/test_workflow_topoambigouity_auto_laidout.ga rename to lib/galaxy_test/base/data/test_workflow_topoambigouity_auto_laidout.ga diff --git a/test/base/data/test_workflow_validation_1.ga b/lib/galaxy_test/base/data/test_workflow_validation_1.ga similarity index 100% rename from test/base/data/test_workflow_validation_1.ga rename to lib/galaxy_test/base/data/test_workflow_validation_1.ga diff --git a/test/base/data/test_workflow_with_runtime_input.ga b/lib/galaxy_test/base/data/test_workflow_with_runtime_input.ga similarity index 100% rename from test/base/data/test_workflow_with_runtime_input.ga rename to lib/galaxy_test/base/data/test_workflow_with_runtime_input.ga diff --git a/test/base/instrument.py b/lib/galaxy_test/base/instrument.py similarity index 100% rename from test/base/instrument.py rename to lib/galaxy_test/base/instrument.py diff --git a/test/base/interactor.py b/lib/galaxy_test/base/interactor.py similarity index 100% rename from test/base/interactor.py rename to lib/galaxy_test/base/interactor.py diff --git a/test/base/nose_util.py b/lib/galaxy_test/base/nose_util.py similarity index 100% rename from test/base/nose_util.py rename to lib/galaxy_test/base/nose_util.py diff --git a/test/base/populators.py b/lib/galaxy_test/base/populators.py similarity index 100% rename from test/base/populators.py rename to lib/galaxy_test/base/populators.py diff --git a/test/base/rules_test_data.py b/lib/galaxy_test/base/rules_test_data.py similarity index 100% rename from test/base/rules_test_data.py rename to lib/galaxy_test/base/rules_test_data.py diff --git a/test/base/ssh_util.py b/lib/galaxy_test/base/ssh_util.py similarity index 100% rename from test/base/ssh_util.py rename to lib/galaxy_test/base/ssh_util.py diff --git a/test/base/workflow_fixtures.py b/lib/galaxy_test/base/workflow_fixtures.py similarity index 100% rename from test/base/workflow_fixtures.py rename to lib/galaxy_test/base/workflow_fixtures.py diff --git a/lib/galaxy_test/driver/__init__.py b/lib/galaxy_test/driver/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/base/api.py b/lib/galaxy_test/driver/api.py similarity index 96% rename from test/base/api.py rename to lib/galaxy_test/driver/api.py index c6d99404a5c..7579c3a2ce5 100644 --- a/test/base/api.py +++ b/lib/galaxy_test/driver/api.py @@ -3,21 +3,21 @@ from contextlib import contextmanager from six.moves.urllib.parse import urlencode -from .api_asserts import ( +from galaxy_test.base.api_asserts import ( assert_error_code_is, assert_has_keys, assert_not_has_keys, assert_status_code_is, assert_status_code_is_ok, ) -from .api_util import ( +from galaxy_test.base.api_util import ( ADMIN_TEST_USER, get_master_api_key, get_user_api_key, OTHER_USER, TEST_USER, ) -from .interactor import TestCaseGalaxyInteractor as BaseInteractor +from galaxy_test.base.interactor import TestCaseGalaxyInteractor as BaseInteractor from .testcase import FunctionalTestCase diff --git a/test/base/driver_util.py b/lib/galaxy_test/driver/driver_util.py similarity index 99% rename from test/base/driver_util.py rename to lib/galaxy_test/driver/driver_util.py index 905e6eecc78..52b80582ca2 100644 --- a/test/base/driver_util.py +++ b/lib/galaxy_test/driver/driver_util.py @@ -36,16 +36,16 @@ from galaxy.config import LOGGING_CONFIG_DEFAULT from galaxy.model import mapping from galaxy.model.tool_shed_install import mapping as toolshed_mapping from galaxy.tool_util.verify.interactor import GalaxyInteractorApi, verify_tool -from galaxy.util import asbool, download_to_file +from galaxy.util import asbool, download_to_file, galaxy_directory from galaxy.util.properties import load_app_properties from galaxy.web import buildapp +from galaxy_test.base.api_util import get_master_api_key, get_user_api_key +from galaxy_test.base.instrument import StructuredTestDataPlugin +from galaxy_test.base.nose_util import run from tool_shed.webapp.app import UniverseApplication as ToolshedUniverseApplication -from .api_util import get_master_api_key, get_user_api_key -from .instrument import StructuredTestDataPlugin -from .nose_util import run from .test_logging import logging_config_file -galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) +galaxy_root = galaxy_directory() DEFAULT_WEB_HOST = socket.gethostbyname('localhost') DEFAULT_CONFIG_PREFIX = "GALAXY" GALAXY_TEST_DIRECTORY = os.path.join(galaxy_root, "test") diff --git a/test/base/integration_util.py b/lib/galaxy_test/driver/integration_util.py similarity index 100% rename from test/base/integration_util.py rename to lib/galaxy_test/driver/integration_util.py diff --git a/test/base/test_logging.py b/lib/galaxy_test/driver/test_logging.py similarity index 100% rename from test/base/test_logging.py rename to lib/galaxy_test/driver/test_logging.py diff --git a/test/base/testcase.py b/lib/galaxy_test/driver/testcase.py similarity index 100% rename from test/base/testcase.py rename to lib/galaxy_test/driver/testcase.py diff --git a/scripts/functional_tests.py b/scripts/functional_tests.py index 354f7f014f0..2e27b57cb67 100644 --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -12,8 +12,8 @@ import sys galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path[1:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "test")] -from base import driver_util -from base.api_util import get_master_api_key, get_user_api_key +from galaxy_test.base.api_util import get_master_api_key, get_user_api_key +from galaxy_test.driver import driver_util log = driver_util.build_logger() diff --git a/setup.cfg b/setup.cfg index 4eafad8d715..a21920be2b8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,4 +15,4 @@ exclude = lib/galaxy/util/jstree.py # For flake8-import-order # https://github.com/PyCQA/flake8-import-order/blob/master/tests/test_cases/complete_smarkets.py import-order-style = smarkets -application-import-names = galaxy,tool_shed +application-import-names = galaxy,galaxy_test,tool_shed diff --git a/test/api/test_api_batch.py b/test/api/test_api_batch.py index 8975f1ecf53..115d633d813 100644 --- a/test/api/test_api_batch.py +++ b/test/api/test_api_batch.py @@ -2,7 +2,7 @@ import json from requests import post -from base import api # noqa: I100,I202 +from galaxy_test.driver import api class ApiBatchTestCase(api.ApiTestCase): diff --git a/test/api/test_authenticate.py b/test/api/test_authenticate.py index 954b35815d4..26b8cc5eeed 100644 --- a/test/api/test_authenticate.py +++ b/test/api/test_authenticate.py @@ -2,7 +2,7 @@ import base64 from requests import get -from base import api # noqa: I100,I202 +from galaxy_test.driver import api TEST_USER_EMAIL = "auth_user_test@bx.psu.edu" TEST_USER_PASSWORD = "testpassword1" diff --git a/test/api/test_configuration.py b/test/api/test_configuration.py index 91e192ba621..f2ab0926e67 100644 --- a/test/api/test_configuration.py +++ b/test/api/test_configuration.py @@ -1,11 +1,11 @@ -from base import api -from base.api_asserts import ( +from galaxy_test.base.api_asserts import ( assert_has_keys, assert_not_has_keys, ) -from base.populators import ( +from galaxy_test.base.populators import ( LibraryPopulator ) +from galaxy_test.driver import api TEST_KEYS_FOR_ALL_USERS = [ 'enable_unique_workflow_defaults', diff --git a/test/api/test_dataset_collections.py b/test/api/test_dataset_collections.py index a719af89ac1..f563b9dd9e6 100644 --- a/test/api/test_dataset_collections.py +++ b/test/api/test_dataset_collections.py @@ -1,10 +1,11 @@ import json import tarfile -from base import api -from base.populators import DatasetCollectionPopulator, DatasetPopulator, skip_if_github_down from six import BytesIO +from galaxy_test.base.populators import DatasetCollectionPopulator, DatasetPopulator, skip_if_github_down +from galaxy_test.driver import api + class DatasetCollectionApiTestCase(api.ApiTestCase): diff --git a/test/api/test_datasets.py b/test/api/test_datasets.py index 013fcf2d10b..7a1407f3523 100644 --- a/test/api/test_datasets.py +++ b/test/api/test_datasets.py @@ -2,11 +2,11 @@ from __future__ import print_function import textwrap -from base import api -from base.populators import ( +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, ) +from galaxy_test.driver import api class DatasetsApiTestCase(api.ApiTestCase): diff --git a/test/api/test_datatypes.py b/test/api/test_datatypes.py index f6a905e1f3e..d095d180e4d 100644 --- a/test/api/test_datatypes.py +++ b/test/api/test_datatypes.py @@ -2,7 +2,7 @@ import time from requests import put -from base import api # noqa: I100,I202 +from galaxy_test.driver import api HIDDEN_DURING_UPLOAD_DATATYPE = "fli" diff --git a/test/api/test_framework.py b/test/api/test_framework.py index d299d186185..c660346341b 100644 --- a/test/api/test_framework.py +++ b/test/api/test_framework.py @@ -1,6 +1,6 @@ # This file doesn't test any API in particular but is meant to functionally # test the API framework itself. -from base import api +from galaxy_test.driver import api class ApiFrameworkTestCase(api.ApiTestCase): diff --git a/test/api/test_galaxy_interactor.py b/test/api/test_galaxy_interactor.py index e6084b7364e..7db692afa34 100644 --- a/test/api/test_galaxy_interactor.py +++ b/test/api/test_galaxy_interactor.py @@ -2,7 +2,7 @@ from packaging.version import Version -from base import api # noqa: I100,I202 +from galaxy_test.driver import api class GalaxyInteractorBackwardCompatTestCase(api.ApiTestCase): diff --git a/test/api/test_histories.py b/test/api/test_histories.py index 6a5fc16a714..6c24868c96c 100644 --- a/test/api/test_histories.py +++ b/test/api/test_histories.py @@ -6,11 +6,11 @@ from requests import ( put ) -from base import api # noqa: I100,I202 -from base.populators import ( # noqa: I100 +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, ) +from galaxy_test.driver import api class HistoriesApiTestCase(api.ApiTestCase): diff --git a/test/api/test_history_contents.py b/test/api/test_history_contents.py index 3b994496156..03c017220f5 100644 --- a/test/api/test_history_contents.py +++ b/test/api/test_history_contents.py @@ -4,14 +4,14 @@ import json from requests import delete, put -from base import api # noqa: I100,I202 -from base.populators import ( # noqa: I100 +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, LibraryPopulator, skip_without_tool, TestsDatasets, ) +from galaxy_test.driver import api # TODO: Test anonymous access. diff --git a/test/api/test_history_contents_provenance.py b/test/api/test_history_contents_provenance.py index 70be6e82aef..f9506010111 100644 --- a/test/api/test_history_contents_provenance.py +++ b/test/api/test_history_contents_provenance.py @@ -1,5 +1,5 @@ -from base import api -from base.populators import DatasetPopulator +from galaxy_test.base.populators import DatasetPopulator +from galaxy_test.driver import api class TestProvenance(api.ApiTestCase): diff --git a/test/api/test_jobs.py b/test/api/test_jobs.py index e3a5908dacd..951551d47d3 100644 --- a/test/api/test_jobs.py +++ b/test/api/test_jobs.py @@ -6,9 +6,8 @@ from operator import itemgetter import requests -from base import api # noqa: I100,I202 -from base.api_asserts import assert_status_code_is_ok # noqa: I100 -from base.populators import ( # noqa: I100 +from galaxy_test.base.api_asserts import assert_status_code_is_ok +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, skip_without_tool, @@ -16,6 +15,7 @@ from base.populators import ( # noqa: I100 wait_on, wait_on_state, ) +from galaxy_test.driver import api class JobsApiTestCase(api.ApiTestCase): diff --git a/test/api/test_libraries.py b/test/api/test_libraries.py index 2cc91c491b6..abcdd33167f 100644 --- a/test/api/test_libraries.py +++ b/test/api/test_libraries.py @@ -2,13 +2,13 @@ import json import time import unittest -from base import api -from base.populators import ( +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, LibraryPopulator, TestsDatasets, ) +from galaxy_test.driver import api FILE_URL = 'https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/4.bed' FILE_MD5 = "37b59762b59fff860460522d271bc111" diff --git a/test/api/test_pages.py b/test/api/test_pages.py index 8b4a19adc0f..09bc829f9e5 100644 --- a/test/api/test_pages.py +++ b/test/api/test_pages.py @@ -1,8 +1,8 @@ from requests import delete -from base import api # noqa: I100,I202 -from base.populators import DatasetPopulator -from galaxy.exceptions import error_codes # noqa: I201 +from galaxy.exceptions import error_codes +from galaxy_test.base.populators import DatasetPopulator +from galaxy_test.driver import api class BasePageApiTestCase(api.ApiTestCase): diff --git a/test/api/test_roles.py b/test/api/test_roles.py index a0d9aa6dacb..2bf83ba0d04 100644 --- a/test/api/test_roles.py +++ b/test/api/test_roles.py @@ -1,13 +1,13 @@ import json -from base import api -from base.api_asserts import ( +from galaxy_test.base.api_asserts import ( assert_has_keys, assert_status_code_is, ) -from base.populators import ( # noqa: I100 +from galaxy_test.base.populators import ( DatasetPopulator, ) +from galaxy_test.driver import api class RolesApiTestCase(api.ApiTestCase): diff --git a/test/api/test_search.py b/test/api/test_search.py index 16a288cc000..60fc2d2b722 100644 --- a/test/api/test_search.py +++ b/test/api/test_search.py @@ -1,7 +1,8 @@ -from base import api -from base.populators import WorkflowPopulator from requests import delete +from galaxy_test.base.populators import WorkflowPopulator +from galaxy_test.driver import api + class SearchApiTestCase(api.ApiTestCase): diff --git a/test/api/test_tool_data.py b/test/api/test_tool_data.py index 6bf724c4516..c5aca42a0c7 100644 --- a/test/api/test_tool_data.py +++ b/test/api/test_tool_data.py @@ -4,7 +4,7 @@ from __future__ import print_function import operator -from base import api +from galaxy_test.driver import api class ToolDataApiTestCase(api.ApiTestCase): diff --git a/test/api/test_tools.py b/test/api/test_tools.py index 4b229df9ac5..5a86c4fab26 100644 --- a/test/api/test_tools.py +++ b/test/api/test_tools.py @@ -5,9 +5,11 @@ import os import tarfile import pytest -from base import api -from base import rules_test_data -from base.populators import ( +from requests import get +from six import BytesIO + +from galaxy_test.base import rules_test_data +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, LibraryPopulator, @@ -15,8 +17,7 @@ from base.populators import ( skip_without_tool, uses_test_history, ) -from requests import get -from six import BytesIO +from galaxy_test.driver import api MINIMAL_TOOL = { diff --git a/test/api/test_tools_upload.py b/test/api/test_tools_upload.py index a6cde5cb9ae..41115896ba3 100644 --- a/test/api/test_tools_upload.py +++ b/test/api/test_tools_upload.py @@ -1,19 +1,18 @@ import json -from base import api -from base.constants import ( +from galaxy.tool_util.verify.test_data import TestDataResolver +from galaxy_test.base.constants import ( ONE_TO_SIX_ON_WINDOWS, ONE_TO_SIX_WITH_SPACES, ONE_TO_SIX_WITH_TABS, ) -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, skip_if_site_down, skip_without_datatype, uses_test_history, ) - -from galaxy.tool_util.verify.test_data import TestDataResolver +from galaxy_test.driver import api class ToolsUploadTestCase(api.ApiTestCase): diff --git a/test/api/test_tours.py b/test/api/test_tours.py index bcd9cb43931..97430198aff 100644 --- a/test/api/test_tours.py +++ b/test/api/test_tours.py @@ -1,4 +1,4 @@ -from base import api +from galaxy_test.driver import api class TourApiTestCase(api.ApiTestCase): diff --git a/test/api/test_users.py b/test/api/test_users.py index 2d05e0d4219..3ffb3c533f6 100644 --- a/test/api/test_users.py +++ b/test/api/test_users.py @@ -6,8 +6,8 @@ from requests import ( put ) -from base import api # noqa: I100,I202 -from base.populators import skip_without_tool +from galaxy_test.base.populators import skip_without_tool +from galaxy_test.driver import api TEST_USER_EMAIL = "user_for_users_index_test@bx.psu.edu" TEST_USER_EMAIL_DELETE = "user_for_delete_test@bx.psu.edu" diff --git a/test/api/test_visualizations.py b/test/api/test_visualizations.py index b73cdad5c68..cabcfe495f3 100644 --- a/test/api/test_visualizations.py +++ b/test/api/test_visualizations.py @@ -5,8 +5,8 @@ from requests import ( put ) -from base import api # noqa: I100,I202 -from base.api_asserts import assert_has_keys # noqa: I100 +from galaxy_test.base.api_asserts import assert_has_keys +from galaxy_test.driver import api INDEX_KEYS = [ 'id', 'title', 'type', 'dbkey', 'url' diff --git a/test/api/test_webhooks.py b/test/api/test_webhooks.py index 62cfb049bc9..4aad3b3e67c 100644 --- a/test/api/test_webhooks.py +++ b/test/api/test_webhooks.py @@ -1,13 +1,10 @@ -from base import api -from base.driver_util import TEST_WEBHOOKS_DIR -from galaxy.webhooks import WebhooksRegistry # noqa: I201 +from galaxy_test.driver import api class WebhooksApiTestCase(api.ApiTestCase): def setUp(self): super(WebhooksApiTestCase, self).setUp() - self.webhooks_registry = WebhooksRegistry(TEST_WEBHOOKS_DIR) def test_get_all(self): response = self._get('webhooks') diff --git a/test/api/test_workflow_extraction.py b/test/api/test_workflow_extraction.py index 9ac877e07a2..048f20aa237 100644 --- a/test/api/test_workflow_extraction.py +++ b/test/api/test_workflow_extraction.py @@ -5,8 +5,7 @@ import operator from collections import namedtuple from json import dumps, loads -from base.populators import skip_without_tool, summarize_instance_history_on_error - +from galaxy_test.base.populators import skip_without_tool, summarize_instance_history_on_error from .test_workflows import BaseWorkflowsApiTestCase diff --git a/test/api/test_workflows.py b/test/api/test_workflows.py index f0ac9a5017c..facca556f6e 100644 --- a/test/api/test_workflows.py +++ b/test/api/test_workflows.py @@ -7,16 +7,16 @@ from uuid import uuid4 from requests import delete, get, put -from base import api # noqa: I100,I202 -from base import rules_test_data # noqa: I100 -from base.populators import ( # noqa: I100 +from galaxy.exceptions import error_codes +from galaxy_test.base import rules_test_data +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, skip_without_tool, wait_on, WorkflowPopulator ) -from base.workflow_fixtures import ( # noqa: I100 +from galaxy_test.base.workflow_fixtures import ( WORKFLOW_NESTED_REPLACEMENT_PARAMETER, WORKFLOW_NESTED_RUNTIME_PARAMETER, WORKFLOW_NESTED_SIMPLE, @@ -30,7 +30,7 @@ from base.workflow_fixtures import ( # noqa: I100 WORKFLOW_WITH_OUTPUT_COLLECTION_MAPPING, WORKFLOW_WITH_RULES_1, ) -from galaxy.exceptions import error_codes # noqa: I201 +from galaxy_test.driver import api NESTED_WORKFLOW_AUTO_LABELS = """ diff --git a/test/api/test_workflows_from_yaml.py b/test/api/test_workflows_from_yaml.py index c3ebec9a02f..73e0c101af6 100644 --- a/test/api/test_workflows_from_yaml.py +++ b/test/api/test_workflows_from_yaml.py @@ -3,15 +3,14 @@ from __future__ import print_function import json import os -from base.populators import uses_test_history -from base.workflow_fixtures import ( +from galaxy_test.base.populators import uses_test_history +from galaxy_test.base.workflow_fixtures import ( WORKFLOW_RUNTIME_PARAMETER_SIMPLE, WORKFLOW_SIMPLE_CAT_AND_RANDOM_LINES, WORKFLOW_SIMPLE_CAT_TWICE, WORKFLOW_WITH_OUTPUT_ACTIONS, WORKFLOW_WITH_OUTPUTS ) - from .test_workflows import BaseWorkflowsApiTestCase WORKFLOWS_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/functional/test_toolbox.py b/test/functional/test_toolbox.py index 6dd7a3cda58..24e45a5c8e7 100644 --- a/test/functional/test_toolbox.py +++ b/test/functional/test_toolbox.py @@ -8,11 +8,11 @@ except ImportError: def nottest(x): return x -from base.driver_util import setup_keep_outdir, target_url_parts -from base.instrument import register_job_data -from base.testcase import FunctionalTestCase # noqa: I100,I201,I202 -from galaxy.tool_util.verify.interactor import GalaxyInteractorApi, verify_tool # noqa: I201 -from galaxy.tools import DataManagerTool # noqa: I201 +from galaxy.tool_util.verify.interactor import GalaxyInteractorApi, verify_tool +from galaxy.tools import DataManagerTool +from galaxy_test.base.instrument import register_job_data +from galaxy_test.driver.driver_util import setup_keep_outdir, target_url_parts +from galaxy_test.driver.testcase import FunctionalTestCase log = logging.getLogger(__name__) diff --git a/test/functional/test_toolbox_pytest.py b/test/functional/test_toolbox_pytest.py index 44417feb380..88cdfe56d8f 100644 --- a/test/functional/test_toolbox_pytest.py +++ b/test/functional/test_toolbox_pytest.py @@ -5,7 +5,8 @@ galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pa sys.path[1:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "test")] import pytest -from base import driver_util + +from galaxy_test.driver import driver_util SKIPTEST = os.path.join(os.path.dirname(__file__), 'known_broken_tools.txt') TEST_PREFIX = 'TestForTool_' diff --git a/test/integration/objectstore/test_jobs.py b/test/integration/objectstore/test_jobs.py index e81960a12bc..b53b68a6f5a 100644 --- a/test/integration/objectstore/test_jobs.py +++ b/test/integration/objectstore/test_jobs.py @@ -3,10 +3,10 @@ import os import string -from base import integration_util # noqa: I202 -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, ) +from galaxy_test.driver import integration_util DISTRIBUTED_OBJECT_STORE_CONFIG_TEMPLATE = string.Template(""" diff --git a/test/integration/objectstore/test_selection.py b/test/integration/objectstore/test_selection.py index da2576ecf97..fca6711eee3 100644 --- a/test/integration/objectstore/test_selection.py +++ b/test/integration/objectstore/test_selection.py @@ -3,10 +3,10 @@ import os import string -from base import integration_util # noqa: I202 -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, ) +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "selection_job_conf.xml") diff --git a/test/integration/test_chained_dynamic_destinations.py b/test/integration/test_chained_dynamic_destinations.py index 2e3b8c8ef23..c684bc2533b 100644 --- a/test/integration/test_chained_dynamic_destinations.py +++ b/test/integration/test_chained_dynamic_destinations.py @@ -3,10 +3,9 @@ import os import tempfile -from base.populators import ( +from galaxy_test.base.populators import ( skip_without_tool, ) - from .test_job_environments import BaseJobEnvironmentIntegrationTestCase SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/integration/test_cli_runners.py b/test/integration/test_cli_runners.py index 370c37da79f..d09e6c07fd3 100644 --- a/test/integration/test_cli_runners.py +++ b/test/integration/test_cli_runners.py @@ -6,10 +6,10 @@ import subprocess import tempfile import unittest -from base import integration_util # noqa: I100,I202 -from base.populators import skip_without_tool -from base.ssh_util import generate_ssh_keys -from .test_job_environments import BaseJobEnvironmentIntegrationTestCase # noqa: I201 +from galaxy_test.base.populators import skip_without_tool +from galaxy_test.base.ssh_util import generate_ssh_keys +from galaxy_test.driver import integration_util +from .test_job_environments import BaseJobEnvironmentIntegrationTestCase RemoteConnection = collections.namedtuple('remote_connection', ['hostname', 'username', 'password', 'port', 'private_key', 'public_key']) diff --git a/test/integration/test_config_defaults.py b/test/integration/test_config_defaults.py index 752e8c4962c..f0a16393a0a 100644 --- a/test/integration/test_config_defaults.py +++ b/test/integration/test_config_defaults.py @@ -3,9 +3,9 @@ from collections import namedtuple from datetime import timedelta import pytest -from base.driver_util import GalaxyTestDriver from galaxy.util import listify +from galaxy_test.driver.driver_util import GalaxyTestDriver """ diff --git a/test/integration/test_config_options_users.py b/test/integration/test_config_options_users.py index ff74a4eff81..abfe952cf7a 100644 --- a/test/integration/test_config_options_users.py +++ b/test/integration/test_config_options_users.py @@ -1,6 +1,6 @@ """Integration tests for user config options.""" -from base import integration_util +from galaxy_test.driver import integration_util class _BaseUserExposeIntegerationTestCase(integration_util.IntegrationTestCase): diff --git a/test/integration/test_containerized_jobs.py b/test/integration/test_containerized_jobs.py index 8ae6dcfd71b..18230b34fa8 100644 --- a/test/integration/test_containerized_jobs.py +++ b/test/integration/test_containerized_jobs.py @@ -3,12 +3,11 @@ import os import unittest -from base import integration_util -from base.populators import ( +from galaxy.tool_util.deps.commands import which +from galaxy_test.base.populators import ( DatasetPopulator, ) - -from galaxy.tool_util.deps.commands import which +from galaxy_test.driver import integration_util from .test_job_environments import RunsEnvironmentJobs SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/integration/test_data_manager.py b/test/integration/test_data_manager.py index c291302fae4..7e860aeef00 100644 --- a/test/integration/test_data_manager.py +++ b/test/integration/test_data_manager.py @@ -1,10 +1,10 @@ import random import string -from base import integration_util -from base.populators import DatasetPopulator, skip_if_toolshed_down from nose.plugins.skip import SkipTest +from galaxy_test.base.populators import DatasetPopulator, skip_if_toolshed_down +from galaxy_test.driver import integration_util from .uses_shed import CONDA_AUTO_INSTALL_JOB_TIMEOUT, UsesShed FETCH_TOOL_ID = 'toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_dbkeys_all_fasta/data_manager_fetch_genome_all_fasta_dbkey/0.0.2' diff --git a/test/integration/test_datatype_upload.py b/test/integration/test_datatype_upload.py index 46275580351..83ac60f82c2 100644 --- a/test/integration/test_datatype_upload.py +++ b/test/integration/test_datatype_upload.py @@ -4,14 +4,14 @@ import tempfile import pytest -from base import integration_util # noqa: I100,I202 -from galaxy.datatypes.registry import Registry # noqa: I201 +from galaxy.datatypes.registry import Registry from galaxy.util.checkers import ( is_bz2, is_gzip, is_zip ) from galaxy.util.hash_util import md5_hash_file +from galaxy_test.driver import integration_util from .test_upload_configuration_options import BaseUploadContentConfigurationInstance SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/integration/test_fail_job_tool_unavailable.py b/test/integration/test_fail_job_tool_unavailable.py index f317dd8fe83..1b53845441a 100644 --- a/test/integration/test_fail_job_tool_unavailable.py +++ b/test/integration/test_fail_job_tool_unavailable.py @@ -1,10 +1,10 @@ import time -from base import integration_util -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, WorkflowPopulator, ) +from galaxy_test.driver import integration_util class FailJobWhenToolUnavailableTestCase(integration_util.IntegrationTestCase): diff --git a/test/integration/test_handler_assignment_methods.py b/test/integration/test_handler_assignment_methods.py index c80d8737784..08da1e03ef8 100644 --- a/test/integration/test_handler_assignment_methods.py +++ b/test/integration/test_handler_assignment_methods.py @@ -2,7 +2,7 @@ import os -from base import integration_util +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) HANDLER_TEMPLATE_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "handler_template_job_conf.xml") diff --git a/test/integration/test_interactivetools_api.py b/test/integration/test_interactivetools_api.py index a277481fa31..e214e3eee80 100644 --- a/test/integration/test_interactivetools_api.py +++ b/test/integration/test_interactivetools_api.py @@ -3,12 +3,12 @@ import os import requests -from base import api_asserts -from base.populators import ( + +from galaxy_test.base import api_asserts +from galaxy_test.base.populators import ( DatasetPopulator, wait_on, ) - from .test_containerized_jobs import ContainerizedIntegrationTestCase SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/integration/test_job_environments.py b/test/integration/test_job_environments.py index b950627600b..7b2892e4524 100644 --- a/test/integration/test_job_environments.py +++ b/test/integration/test_job_environments.py @@ -4,11 +4,11 @@ import collections import os import tempfile -from base import integration_util -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, skip_without_tool, ) +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) SIMPLE_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "simple_job_conf.xml") diff --git a/test/integration/test_job_recovery.py b/test/integration/test_job_recovery.py index 6d0d0db1641..475fc9e5806 100644 --- a/test/integration/test_job_recovery.py +++ b/test/integration/test_job_recovery.py @@ -2,10 +2,10 @@ import os -from base import integration_util # noqa: I202 -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, ) +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) DELAY_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "delay_job_conf.yml") diff --git a/test/integration/test_job_resubmission.py b/test/integration/test_job_resubmission.py index 0ec1ab7975f..35c96ffbd43 100644 --- a/test/integration/test_job_resubmission.py +++ b/test/integration/test_job_resubmission.py @@ -2,7 +2,7 @@ import os -from base import integration_util +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) JOB_RESUBMISSION_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "resubmission_job_conf.yml") diff --git a/test/integration/test_kubernetes_runner.py b/test/integration/test_kubernetes_runner.py index 12a88a787ae..69966b6870c 100644 --- a/test/integration/test_kubernetes_runner.py +++ b/test/integration/test_kubernetes_runner.py @@ -10,10 +10,10 @@ import time import pytest -from base import integration_util # noqa: I100,I202 -from base.populators import skip_without_tool -from .test_containerized_jobs import MulledJobTestCases # noqa: I201 -from .test_job_environments import BaseJobEnvironmentIntegrationTestCase # noqa: I201 +from galaxy_test.base.populators import skip_without_tool +from galaxy_test.driver import integration_util +from .test_containerized_jobs import MulledJobTestCases +from .test_job_environments import BaseJobEnvironmentIntegrationTestCase PERSISTENT_VOLUME_NAME = 'pv-galaxy-integration-test' PERSISTENT_VOLUME_CLAIM_NAME = 'galaxy-pvc-integration-test' diff --git a/test/integration/test_kubernetes_staging.py b/test/integration/test_kubernetes_staging.py index d9101973710..864dd5fb8b9 100644 --- a/test/integration/test_kubernetes_staging.py +++ b/test/integration/test_kubernetes_staging.py @@ -15,10 +15,10 @@ import os import string import tempfile -from base import integration_util # noqa: I100,I202 -from base.populators import skip_without_tool -from .test_containerized_jobs import EXTENDED_TIMEOUT, MulledJobTestCases # noqa: I201 -from .test_job_environments import BaseJobEnvironmentIntegrationTestCase # noqa: I201 +from galaxy_test.base.populators import skip_without_tool +from galaxy_test.driver import integration_util +from .test_containerized_jobs import EXTENDED_TIMEOUT, MulledJobTestCases +from .test_job_environments import BaseJobEnvironmentIntegrationTestCase TOOL_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'tools')) AMQP_URL = os.environ.get("GALAXY_TEST_AMQP_URL", "amqp://guest:guest@localhost:5672//") diff --git a/test/integration/test_local_job_cancellation.py b/test/integration/test_local_job_cancellation.py index d01cea8bd2e..a0c58090794 100644 --- a/test/integration/test_local_job_cancellation.py +++ b/test/integration/test_local_job_cancellation.py @@ -4,10 +4,10 @@ import time import psutil -from base import integration_util # noqa: I202 -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, ) +from galaxy_test.driver import integration_util class LocalJobCancellationTestCase(integration_util.IntegrationTestCase): diff --git a/test/integration/test_mules_as_job_handlers.py b/test/integration/test_mules_as_job_handlers.py index d790677d2bf..e55d51b98c0 100644 --- a/test/integration/test_mules_as_job_handlers.py +++ b/test/integration/test_mules_as_job_handlers.py @@ -2,8 +2,8 @@ import os -from base import integration_util -from base.populators import DatasetPopulator +from galaxy_test.base.populators import DatasetPopulator +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) diff --git a/test/integration/test_page_revision_json_encoding.py b/test/integration/test_page_revision_json_encoding.py index f509c9b8c10..f238057e040 100644 --- a/test/integration/test_page_revision_json_encoding.py +++ b/test/integration/test_page_revision_json_encoding.py @@ -5,12 +5,12 @@ the security parameter to encode IDs may be changed by admins). Test case also v exported API values are encoded though. """ -from base import api_asserts -from base import integration_util -from base.populators import ( +from galaxy import model +from galaxy_test.base import api_asserts +from galaxy_test.base.populators import ( DatasetPopulator, ) -from galaxy import model # noqa: I101,I201 +from galaxy_test.driver import integration_util class PageJsonEncodingIntegrationTestCase(integration_util.IntegrationTestCase): diff --git a/test/integration/test_pulsar_embedded.py b/test/integration/test_pulsar_embedded.py index 9d107708170..8352e6b1ae4 100644 --- a/test/integration/test_pulsar_embedded.py +++ b/test/integration/test_pulsar_embedded.py @@ -2,7 +2,7 @@ import os -from base import integration_util +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) EMBEDDED_PULSAR_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "embedded_pulsar_job_conf.xml") diff --git a/test/integration/test_pulsar_embedded_containers.py b/test/integration/test_pulsar_embedded_containers.py index 25bebabd952..79981c49a3d 100644 --- a/test/integration/test_pulsar_embedded_containers.py +++ b/test/integration/test_pulsar_embedded_containers.py @@ -1,10 +1,10 @@ import os -from base import integration_util # noqa: I100,I202 -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, ) -from .test_containerized_jobs import ( # noqa: I201 +from galaxy_test.driver import integration_util +from .test_containerized_jobs import ( disable_dependency_resolution, MulledJobTestCases, skip_if_container_type_unavailable, diff --git a/test/integration/test_pulsar_embedded_copy_working.py b/test/integration/test_pulsar_embedded_copy_working.py index 814d0086aa5..0680519e3af 100644 --- a/test/integration/test_pulsar_embedded_copy_working.py +++ b/test/integration/test_pulsar_embedded_copy_working.py @@ -2,7 +2,7 @@ import os -from base import integration_util +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) EMBEDDED_PULSAR_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "embedded_pulsar_job_conf.yml") diff --git a/test/integration/test_pulsar_embedded_metadata.py b/test/integration/test_pulsar_embedded_metadata.py index 66412144021..4ebae4a5037 100644 --- a/test/integration/test_pulsar_embedded_metadata.py +++ b/test/integration/test_pulsar_embedded_metadata.py @@ -2,7 +2,7 @@ import os -from base import integration_util +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) EMBEDDED_PULSAR_JOB_CONFIG_FILE = os.path.join(SCRIPT_DIRECTORY, "embedded_pulsar_metadata_job_conf.yml") diff --git a/test/integration/test_resolvers.py b/test/integration/test_resolvers.py index 94a55562b8d..f20d9964400 100644 --- a/test/integration/test_resolvers.py +++ b/test/integration/test_resolvers.py @@ -2,10 +2,10 @@ import os from tempfile import mkdtemp -from base import integration_util -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, ) +from galaxy_test.driver import integration_util GNUPLOT = {u'version': u'4.6', u'type': u'package', u'name': u'gnuplot'} diff --git a/test/integration/test_scripts.py b/test/integration/test_scripts.py index b6ecdedd565..cbedbd75f0e 100644 --- a/test/integration/test_scripts.py +++ b/test/integration/test_scripts.py @@ -8,13 +8,13 @@ import tempfile import unittest import yaml -from base import integration_util -from base.populators import DatasetPopulator from galaxy.util import ( galaxy_directory, unicodify ) +from galaxy_test.base.populators import DatasetPopulator +from galaxy_test.driver import integration_util def skip_unless_module(module): diff --git a/test/integration/test_shed_tool_tests.py b/test/integration/test_shed_tool_tests.py index 66d84bde41c..f6d629d6527 100644 --- a/test/integration/test_shed_tool_tests.py +++ b/test/integration/test_shed_tool_tests.py @@ -1,6 +1,5 @@ -from base import integration_util -from base.populators import skip_if_toolshed_down - +from galaxy_test.base.populators import skip_if_toolshed_down +from galaxy_test.driver import integration_util from .uses_shed import UsesShed diff --git a/test/integration/test_upload_configuration_options.py b/test/integration/test_upload_configuration_options.py index 75a92529d93..0bc0b8934e4 100644 --- a/test/integration/test_upload_configuration_options.py +++ b/test/integration/test_upload_configuration_options.py @@ -26,20 +26,20 @@ import shutil import tempfile import unittest -from base import integration_util -from base.api_util import ( +from galaxy_test.base.api_util import ( TEST_USER, ) -from base.constants import ( +from galaxy_test.base.constants import ( ONE_TO_SIX_ON_WINDOWS, ONE_TO_SIX_WITH_SPACES, ONE_TO_SIX_WITH_TABS, ) -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, LibraryPopulator, skip_without_datatype, ) +from galaxy_test.driver import integration_util SCRIPT_DIR = os.path.normpath(os.path.dirname(__file__)) diff --git a/test/integration/test_work_queue_put_failure.py b/test/integration/test_work_queue_put_failure.py index b155d01abb3..8b28414a447 100644 --- a/test/integration/test_work_queue_put_failure.py +++ b/test/integration/test_work_queue_put_failure.py @@ -1,7 +1,7 @@ import tempfile -from base import integration_util -from base.populators import DatasetPopulator +from galaxy_test.base.populators import DatasetPopulator +from galaxy_test.driver import integration_util job_conf_yaml = """ runners: diff --git a/test/integration/test_workflow_handler_configuration.py b/test/integration/test_workflow_handler_configuration.py index 18cbbe4a0f1..423c67f7cd4 100644 --- a/test/integration/test_workflow_handler_configuration.py +++ b/test/integration/test_workflow_handler_configuration.py @@ -4,11 +4,11 @@ import os import re from json import dumps -from base import integration_util -from base.populators import ( +from galaxy_test.base.populators import ( DatasetPopulator, WorkflowPopulator, ) +from galaxy_test.driver import integration_util SCRIPT_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) WORKFLOW_HANDLER_CONFIGURATION_JOB_CONF = os.path.join(SCRIPT_DIRECTORY, "workflow_handler_configuration_job_conf.xml") diff --git a/test/integration/test_workflow_scheduling_options.py b/test/integration/test_workflow_scheduling_options.py index 548fa04834f..b0d93f4dd40 100644 --- a/test/integration/test_workflow_scheduling_options.py +++ b/test/integration/test_workflow_scheduling_options.py @@ -3,12 +3,12 @@ import time from json import dumps -from base import integration_util -from base.populators import ( +from galaxy_test.base.populators import ( DatasetCollectionPopulator, DatasetPopulator, WorkflowPopulator, ) +from galaxy_test.driver import integration_util class MaximumWorkflowInvocationDurationTestCase(integration_util.IntegrationTestCase): diff --git a/test/integration/test_workflow_sync.py b/test/integration/test_workflow_sync.py index 8e496043d69..4d6ff894e4f 100644 --- a/test/integration/test_workflow_sync.py +++ b/test/integration/test_workflow_sync.py @@ -5,12 +5,12 @@ import os import yaml -from base import integration_util # noqa: I100,I202 -from base.populators import ( # noqa: I100 +from galaxy_test.base.populators import ( DatasetPopulator, WorkflowPopulator, ) -from base.workflow_fixtures import WORKFLOW_SIMPLE_CAT_TWICE # noqa: I100 +from galaxy_test.base.workflow_fixtures import WORKFLOW_SIMPLE_CAT_TWICE +from galaxy_test.driver import integration_util class WorkflowSyncTestCase(integration_util.IntegrationTestCase): diff --git a/test/integration/uses_shed.py b/test/integration/uses_shed.py index 3383d5e0b14..8b2e6e1c370 100644 --- a/test/integration/uses_shed.py +++ b/test/integration/uses_shed.py @@ -2,8 +2,8 @@ import os import string import tempfile -from base.driver_util import FRAMEWORK_UPLOAD_TOOL_CONF -from base.populators import DEFAULT_TIMEOUT +from galaxy_test.base.populators import DEFAULT_TIMEOUT +from galaxy_test.driver.driver_util import FRAMEWORK_UPLOAD_TOOL_CONF # Needs a longer timeout because of the conda_auto_install. CONDA_AUTO_INSTALL_JOB_TIMEOUT = DEFAULT_TIMEOUT * 3 diff --git a/test/manual/gen_history_export_test_artifacts.py b/test/manual/gen_history_export_test_artifacts.py index d02c20178fa..3ad0a82a3f7 100644 --- a/test/manual/gen_history_export_test_artifacts.py +++ b/test/manual/gen_history_export_test_artifacts.py @@ -8,7 +8,7 @@ from bioblend import galaxy galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) sys.path[1:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "test")] -from base.populators import ( # noqa: I100,I202 +from galaxy_test.base.populators import ( GiDatasetPopulator, ) diff --git a/test/manual/workflows_scaling.py b/test/manual/workflows_scaling.py index 35fe2929aa7..6c9c49e173c 100644 --- a/test/manual/workflows_scaling.py +++ b/test/manual/workflows_scaling.py @@ -20,7 +20,7 @@ from gxformat2 import python_to_workflow galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir)) sys.path[1:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "test")] -from base.populators import ( # noqa: I100,I202 +from galaxy_test.base.populators import ( GiDatasetCollectionPopulator, GiDatasetPopulator, GiWorkflowPopulator, diff --git a/test/selenium_tests/framework.py b/test/selenium_tests/framework.py index 0c4fb2a320a..039783306ea 100644 --- a/test/selenium_tests/framework.py +++ b/test/selenium_tests/framework.py @@ -20,18 +20,18 @@ except ImportError: Display = None from six.moves.urllib.parse import urljoin -from base import populators # noqa: I100,I202 -from base.api import UsesApiTestCaseMixin # noqa: I100 -from base.driver_util import classproperty, DEFAULT_WEB_HOST, get_ip_address # noqa: I100 -from base.testcase import FunctionalTestCase # noqa: I100 -from galaxy.selenium import ( # noqa: I100,I201 +from galaxy.selenium import ( driver_factory, ) -from galaxy.selenium.navigates_galaxy import ( # noqa: I100 +from galaxy.selenium.navigates_galaxy import ( NavigatesGalaxy, retry_during_transitions ) -from galaxy.util import asbool # noqa: I201 +from galaxy.util import asbool +from galaxy_test.base import populators +from galaxy_test.driver.api import UsesApiTestCaseMixin +from galaxy_test.driver.driver_util import classproperty, DEFAULT_WEB_HOST, get_ip_address +from galaxy_test.driver.testcase import FunctionalTestCase DEFAULT_TIMEOUT_MULTIPLIER = 1 DEFAULT_TEST_ERRORS_DIRECTORY = os.path.abspath("database/test_errors") diff --git a/test/selenium_tests/test_history_panel_collections.py b/test/selenium_tests/test_history_panel_collections.py index 2cd5d175dfd..a3a2fd9a1a2 100644 --- a/test/selenium_tests/test_history_panel_collections.py +++ b/test/selenium_tests/test_history_panel_collections.py @@ -1,8 +1,7 @@ import time -from base.api_asserts import assert_status_code_is -from base.populators import flakey - +from galaxy_test.base.api_asserts import assert_status_code_is +from galaxy_test.base.populators import flakey from .framework import ( retry_assertion_during_transitions, selenium_test, diff --git a/test/selenium_tests/test_history_panel_pagination.py b/test/selenium_tests/test_history_panel_pagination.py index f2a2c62c738..99d1fe20526 100644 --- a/test/selenium_tests/test_history_panel_pagination.py +++ b/test/selenium_tests/test_history_panel_pagination.py @@ -1,5 +1,4 @@ -from base.populators import flakey - +from galaxy_test.base.populators import flakey from .framework import ( selenium_test, SeleniumTestCase diff --git a/test/selenium_tests/test_jupyter.py b/test/selenium_tests/test_jupyter.py index e92a7065d1b..5d1e0d7ae42 100644 --- a/test/selenium_tests/test_jupyter.py +++ b/test/selenium_tests/test_jupyter.py @@ -1,5 +1,4 @@ -from base.populators import flakey - +from galaxy_test.base.populators import flakey from .framework import ( managed_history, selenium_test, diff --git a/test/selenium_tests/test_tool_form.py b/test/selenium_tests/test_tool_form.py index 4ba932dcc69..1995db10f85 100644 --- a/test/selenium_tests/test_tool_form.py +++ b/test/selenium_tests/test_tool_form.py @@ -1,9 +1,8 @@ import json -from base import rules_test_data -from base.populators import flakey, load_data_dict, skip_if_github_down - from galaxy.selenium.navigates_galaxy import retry_call_during_transitions +from galaxy_test.base import rules_test_data +from galaxy_test.base.populators import flakey, load_data_dict, skip_if_github_down from .framework import ( managed_history, retry_assertion_during_transitions, diff --git a/test/selenium_tests/test_workflow_editor.py b/test/selenium_tests/test_workflow_editor.py index 4cf21ce11c0..c67448f1e57 100644 --- a/test/selenium_tests/test_workflow_editor.py +++ b/test/selenium_tests/test_workflow_editor.py @@ -1,6 +1,6 @@ import json -from base.workflow_fixtures import ( +from galaxy_test.base.workflow_fixtures import ( WORKFLOW_NESTED_SIMPLE, WORKFLOW_SIMPLE_CAT_TWICE, WORKFLOW_SIMPLE_MAPPING, @@ -10,7 +10,6 @@ from base.workflow_fixtures import ( WORKFLOW_WITH_RULES_1, WORKFLOW_WITH_RULES_2, ) - from .framework import ( retry_assertion_during_transitions, selenium_test, diff --git a/test/selenium_tests/test_workflow_management.py b/test/selenium_tests/test_workflow_management.py index 2c57da03165..610fdd40828 100644 --- a/test/selenium_tests/test_workflow_management.py +++ b/test/selenium_tests/test_workflow_management.py @@ -1,5 +1,4 @@ -from base.populators import skip_if_github_down - +from galaxy_test.base.populators import skip_if_github_down from .framework import ( retry_assertion_during_transitions, selenium_test, diff --git a/test/selenium_tests/test_workflow_run.py b/test/selenium_tests/test_workflow_run.py index f276477d57a..005b11a8a0e 100644 --- a/test/selenium_tests/test_workflow_run.py +++ b/test/selenium_tests/test_workflow_run.py @@ -1,7 +1,8 @@ import yaml -from base import rules_test_data -from base.populators import load_data_dict -from base.workflow_fixtures import ( + +from galaxy_test.base import rules_test_data +from galaxy_test.base.populators import load_data_dict +from galaxy_test.base.workflow_fixtures import ( WORKFLOW_NESTED_REPLACEMENT_PARAMETER, WORKFLOW_NESTED_RUNTIME_PARAMETER, WORKFLOW_NESTED_SIMPLE, @@ -14,7 +15,6 @@ from base.workflow_fixtures import ( WORKFLOW_WITH_OLD_TOOL_VERSION, WORKFLOW_WITH_RULES_1, ) - from .framework import ( managed_history, selenium_test, diff --git a/test/shed_functional/base/test_db_util.py b/test/shed_functional/base/test_db_util.py index e150a5956e3..88598b61cd2 100644 --- a/test/shed_functional/base/test_db_util.py +++ b/test/shed_functional/base/test_db_util.py @@ -5,7 +5,7 @@ from sqlalchemy import and_, false, true import galaxy.model import galaxy.model.tool_shed_install import tool_shed.webapp.model as model -from base.driver_util import ( # noqa: I100,I201 +from galaxy_test.driver.driver_util import ( galaxy_context as ga_session, install_context as install_session, tool_shed_context as sa_session diff --git a/test/shed_functional/base/twilltestcase.py b/test/shed_functional/base/twilltestcase.py index fb095e863bc..2492da0c07f 100644 --- a/test/shed_functional/base/twilltestcase.py +++ b/test/shed_functional/base/twilltestcase.py @@ -28,9 +28,9 @@ from twill.other_packages._mechanize_dist import ClientForm import galaxy.model.tool_shed_install as galaxy_model import galaxy.util import tool_shed.webapp.util.hgweb_config -from base.testcase import FunctionalTestCase # noqa: I100,I201,I202 -from galaxy.security import idencoding # noqa: I201 -from galaxy.util import smart_str, unicodify # noqa: I201 +from galaxy.security import idencoding +from galaxy.util import smart_str, unicodify +from galaxy_test.driver.testcase import FunctionalTestCase from tool_shed.util import hg_util, xml_util from tool_shed.util.encoding_util import tool_shed_encode from . import common, test_db_util diff --git a/test/shed_functional/functional_tests.py b/test/shed_functional/functional_tests.py index 6a846c2839c..14c0a63ac5f 100644 --- a/test/shed_functional/functional_tests.py +++ b/test/shed_functional/functional_tests.py @@ -14,10 +14,9 @@ galaxy_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pa # Need to remove this directory from sys.path sys.path[0:1] = [os.path.join(galaxy_root, "lib"), os.path.join(galaxy_root, "test")] -from base import driver_util - # This is for the tool shed application. from galaxy.web import buildapp as galaxybuildapp +from galaxy_test.driver import driver_util from tool_shed.webapp import buildapp as toolshedbuildapp log = driver_util.build_logger() diff --git a/test/unit/test_remote_shell.py b/test/unit/test_remote_shell.py index 07881206af2..d460509c3fd 100644 --- a/test/unit/test_remote_shell.py +++ b/test/unit/test_remote_shell.py @@ -6,9 +6,8 @@ try: except ImportError: raise unittest.SkipTest("Skipping tests that require mockssh") -from base.ssh_util import generate_ssh_keys - from galaxy.jobs.runners.cli import CliInterface +from galaxy_test.base.ssh_util import generate_ssh_keys class TestCliInterface(unittest.TestCase): diff --git a/test/unit/test_rule_utils.py b/test/unit/test_rule_utils.py index 51f990d387b..b92b2c8ba49 100644 --- a/test/unit/test_rule_utils.py +++ b/test/unit/test_rule_utils.py @@ -1,7 +1,7 @@ import yaml -from base import rules_test_data from galaxy.util import rules_dsl +from galaxy_test.base import rules_test_data def test_rules():