From aab600f812efbcfbd3424f2224be2f9b991a7c60 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 19 Feb 2026 14:23:21 -0500 Subject: [PATCH 1/5] Delete twill browser infrastructure (Phase 6) Remove twillbrowser.py, is_twill property/conditionals, _escape_page_content_if_needed, and twill dependency. Replace twill-based HTTP client in GalaxyInteractorToolShedInstallationClient with requests.Session. Co-Authored-By: Claude Opus 4.6 --- lib/tool_shed/test/base/README.md | 8 +- lib/tool_shed/test/base/browser.py | 5 - lib/tool_shed/test/base/playwrightbrowser.py | 4 - lib/tool_shed/test/base/twillbrowser.py | 148 ------------------ lib/tool_shed/test/base/twilltestcase.py | 34 ++-- .../test_0000_basic_repository_features.py | 31 +--- ...test_0420_citable_urls_for_repositories.py | 4 +- packages/tool_shed/setup.cfg | 3 +- 8 files changed, 25 insertions(+), 212 deletions(-) delete mode 100644 lib/tool_shed/test/base/twillbrowser.py diff --git a/lib/tool_shed/test/base/README.md b/lib/tool_shed/test/base/README.md index 6353f6c87fa..ea53786ad6e 100644 --- a/lib/tool_shed/test/base/README.md +++ b/lib/tool_shed/test/base/README.md @@ -10,7 +10,6 @@ base/ ├── twilltestcase.py # ShedTwillTestCase - main test base class ├── playwrighttestcase.py # PlaywrightTestCase - browser test base ├── playwrightbrowser.py # PlaywrightShedBrowser - browser abstraction -├── twillbrowser.py # TwillShedBrowser - legacy browser ├── browser.py # ShedBrowser protocol ├── populators.py # ToolShedPopulator - API fixture creation ├── api.py # ShedApiTestCase - API test base @@ -37,6 +36,7 @@ class TestFeature(ShedTwillTestCase): ``` Key methods: + - `create_category()` - Create test category - `get_or_create_repository()` - Create repository with category - `upload_file()` / `commit_tar_to_repository()` - Upload content @@ -57,6 +57,7 @@ class TestUI(PlaywrightTestCase): ``` Properties: + - `_page` - Playwright Page instance - `_playwright_browser` - PlaywrightShedBrowser wrapper @@ -129,14 +130,11 @@ browser.expect_logged_in() ``` Locators available via `Locators` class: + - `Locators.toolbar_login` - `Locators.login_submit_button` - `Locators.register_link` -### TwillShedBrowser - -Legacy browser using Twill library (deprecated, use Playwright). - ## Test Driver `ToolShedTestDriver` sets up embedded shed server: diff --git a/lib/tool_shed/test/base/browser.py b/lib/tool_shed/test/base/browser.py index ee8e9875d6f..6a9f1b0046e 100644 --- a/lib/tool_shed/test/base/browser.py +++ b/lib/tool_shed/test/base/browser.py @@ -35,11 +35,6 @@ class ShedBrowser(metaclass=abc.ABCMeta): def submit_form_with_name(self, form_name: str, button="runtool_btn", **kwd): """Submit the target button.""" - @property - @abc.abstractmethod - def is_twill(self) -> bool: - """Return whether this is a twill browser.""" - @abc.abstractmethod def edit_repository_categories(self, categories_to_add: list[str], categories_to_remove: list[str]) -> None: """Select some new categories and then restore the component.""" diff --git a/lib/tool_shed/test/base/playwrightbrowser.py b/lib/tool_shed/test/base/playwrightbrowser.py index e4726cf7b92..0d0fca62b72 100644 --- a/lib/tool_shed/test/base/playwrightbrowser.py +++ b/lib/tool_shed/test/base/playwrightbrowser.py @@ -163,10 +163,6 @@ class PlaywrightShedBrowser(ShedBrowser): select_locator.select_option(label=usernames) self.submit_form_with_name("user_access", "user_access_button") - @property - def is_twill(self) -> bool: - return False - def logout_if_logged_in(self, assert_logged_out=True): self._page.wait_for_selector(f"{Locators.toolbar_login}, {Locators.toolbar_logout}") logout_locator = self._page.locator(Locators.toolbar_logout) diff --git a/lib/tool_shed/test/base/twillbrowser.py b/lib/tool_shed/test/base/twillbrowser.py deleted file mode 100644 index 6b294914423..00000000000 --- a/lib/tool_shed/test/base/twillbrowser.py +++ /dev/null @@ -1,148 +0,0 @@ -import tempfile - -import twill.commands as tc -from twill.browser import FormElement # type: ignore[attr-defined, unused-ignore] - -from galaxy.util import smart_str -from .browser import ( - FormValueType, - ShedBrowser, -) - -tc.options["equiv_refresh_interval"] = 0 -# Resetting all repository metadata can take a really long time -tc.timeout(240) - - -def visit_url(url: str, allowed_codes: list[int]) -> str: - tc.go(url) - return_code = tc.browser.code - assert return_code in allowed_codes, "Invalid HTTP return code {}, allowed codes: {}".format( - return_code, - ", ".join(str(code) for code in allowed_codes), - ) - return url - - -def page_content() -> str: - return tc.browser.html - - -class TwillShedBrowser(ShedBrowser): - def visit_url(self, url: str, allowed_codes: list[int]) -> str: - return visit_url(url, allowed_codes=allowed_codes) - - def page_content(self) -> str: - """ - Return the last visited page (usually HTML, but can binary data as - well). - """ - return page_content() - - def check_page_for_string(self, patt: str) -> None: - page = self.page_content() - if page.find(patt) == -1: - fname = self.write_temp_file(page) - errmsg = f"no match to '{patt}'\npage content written to '{fname}'\npage: [[{page}]]" - raise AssertionError(errmsg) - - def check_string_not_in_page(self, patt: str) -> None: - page = self.page_content() - if page.find(patt) != -1: - fname = self.write_temp_file(page) - errmsg = f"string ({patt}) incorrectly displayed in page.\npage content written to '{fname}'" - raise AssertionError(errmsg) - - def write_temp_file(self, content, suffix=".html"): - with tempfile.NamedTemporaryFile(suffix=suffix, prefix="twilltestcase-", delete=False) as fh: - fh.write(smart_str(content)) - return fh.name - - def submit_form_with_name(self, form_name: str, button="runtool_btn", **kwd): - forms_by_name: dict[str, FormElement] = {f.get("name"): f for f in self._show_forms()} - form = forms_by_name[form_name] - self._submit_form(form, button, **kwd) - - def _show_forms(self) -> list[FormElement]: - """Shows form, helpful for debugging new tests""" - return tc.browser.forms - - def submit_form(self, form_no=-1, button="runtool_btn", form=None, **kwd): - if form is None: - try: - form = self._show_forms()[form_no] - except IndexError: - raise ValueError("No form to submit found") - self._submit_form(form, button, **kwd) - - def _submit_form(self, form, button, **kwd): - controls = {c.name: c for c in form.inputs} - form_name = form.get("name") - for control_name, control_value in kwd.items(): - if control_name not in controls: - continue # these cannot be handled safely - cause the test to barf out - if not isinstance(control_value, list): - control_value = [str(control_value)] - control = controls[control_name] - control_type = getattr(control, "type", None) - if control_type in ( - "text", - "textfield", - "submit", - "password", - "TextareaElement", - "checkbox", - "radio", - None, - ): - for cv in control_value: - tc.fv(form_name, control.name, cv) - else: - # Add conditions for other control types here when necessary. - pass - tc.submit(button) - - def fill_form_value(self, form_name: str, control_name: str, value: FormValueType): - value = str(value) - tc.fv(form_name, control_name, value) - - def edit_repository_categories(self, categories_to_add: list[str], categories_to_remove: list[str]) -> None: - """Select some new categories and then restore the component.""" - strings_displayed = [] - strings_not_displayed = [] - for category in categories_to_add: - self.fill_form_value("categories", "category_id", f"+{category}") - strings_displayed.append(f"selected>{category}") - for category in categories_to_remove: - self.fill_form_value("categories", "category_id", f"-{category}") - strings_not_displayed.append(f"selected>{category}") - self.submit_form_with_name("categories", "manage_categories_button") - self._check_for_strings(strings_displayed, strings_not_displayed) - - strings_displayed = [] - strings_not_displayed = [] - for category in categories_to_remove: - self.fill_form_value("categories", "category_id", f"+{category}") - strings_displayed.append(f"selected>{category}") - for category in categories_to_add: - self.fill_form_value("categories", "category_id", f"-{category}") - strings_not_displayed.append(f"selected>{category}") - self.submit_form_with_name("categories", "manage_categories_button") - self._check_for_strings(strings_displayed, strings_not_displayed) - - def grant_users_access(self, usernames: list[str]): - for username in usernames: - self.fill_form_value("user_access", "allow_push", f"+{username}") - self.submit_form_with_name("user_access", "user_access_button") - - @property - def is_twill(self) -> bool: - return True - - def _check_for_strings(self, strings_displayed: list[str], strings_not_displayed: list[str]): - if strings_displayed: - for check_str in strings_displayed: - self.check_page_for_string(check_str) - if strings_not_displayed: - for check_str in strings_not_displayed: - self.check_string_not_in_page(check_str) diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/twilltestcase.py index e18390dfa4e..adeb4224b40 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/twilltestcase.py @@ -77,10 +77,6 @@ from . import ( from .api import ShedApiTestCase from .browser import ShedBrowser from .playwrightbrowser import PlaywrightShedBrowser -from .twillbrowser import ( - page_content, - visit_url, -) if TYPE_CHECKING: from galaxy.model.scoped_session import install_model_scoped_session @@ -198,6 +194,8 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): def __init__(self, testcase: "ShedTwillTestCase"): self.testcase = testcase + self._session = requests.Session() + self._last_page_content = "" def setup(self): self._galaxy_login() @@ -247,7 +245,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): for data_manager_name in data_manager_names: params = {"id": data_managers[data_manager_name]["guid"]} self._visit_galaxy_url("/data_manager/jobs_list", params=params) - content = page_content() + content = self._last_page_content for expected in strings_displayed: if content.find(expected) == -1: raise AssertionError(f"Failed to find pattern {expected} in {content}") @@ -257,7 +255,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): ) -> dict[str, Any]: params = {"id": self.testcase.security.encode_id(installed_repository.id)} self._visit_galaxy_url("/admin_toolshed/manage_repository_json", params=params) - json = page_content() + json = self._last_page_content return loads(json) def install_repository( @@ -413,7 +411,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): def _galaxy_token(self): self._visit_galaxy_url("/") - html = page_content() + html = self._last_page_content token_def_index = html.find("session_csrf_token") token_sep_index = html.find("=", token_def_index) token_quote_start_index = html.find('"', token_sep_index) @@ -426,7 +424,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): tool_guid = quote_plus(tool_metadata[0]["guid"], safe="") api_url = f"/api/tools/{tool_guid}" self._visit_galaxy_url(api_url) - tool_dict = loads(page_content()) + tool_dict = loads(self._last_page_content) tool_panel_section = tool_dict["panel_section_name"] return tool_panel_section @@ -445,7 +443,13 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): allowed_codes = [200] url = f"{self.testcase.galaxy_url}{url}" url = self.testcase.join_url_and_params(url, params) - return visit_url(url, allowed_codes) + response = self._session.get(url, timeout=DEFAULT_SOCKET_TIMEOUT) + assert response.status_code in allowed_codes, "Invalid HTTP return code {}, allowed codes: {}".format( + response.status_code, + ", ".join(str(code) for code in allowed_codes), + ) + self._last_page_content = response.text + return url class StandaloneToolShedInstallationClient(ToolShedInstallationClient): @@ -656,12 +660,6 @@ class ShedTwillTestCase(ShedApiTestCase): assert self.__browser return self.__browser - def _escape_page_content_if_needed(self, content: str) -> str: - # if twill browser is being used - replace spaces with " " - if self._browser.is_twill: - content = content.replace(" ", " ") - return content - def check_for_strings(self, strings_displayed=None, strings_not_displayed=None): strings_displayed = strings_displayed or [] strings_not_displayed = strings_not_displayed or [] @@ -1260,10 +1258,6 @@ class ShedTwillTestCase(ShedApiTestCase): self._browser.fill_form_value("edit_repository", input_elem_name, kwd[input_elem_name]) strings_displayed.append(self.escape_html(kwd[input_elem_name])) self._browser.submit_form_with_name("edit_repository", "edit_repository_button") - # TODO: come back to this (and similar conditional below), the problem is check - # for strings isn't working with with textboxes I think? - if self._browser.is_twill: - self.check_for_strings(strings_displayed) if revert: strings_displayed = [] # assert original_information[input_elem_name] @@ -1273,8 +1267,6 @@ class ShedTwillTestCase(ShedApiTestCase): ) strings_displayed.append(self.escape_html(original_information[input_elem_name])) self._browser.submit_form_with_name("edit_repository", "edit_repository_button") - if self._browser.is_twill: - self.check_for_strings(strings_displayed) def enable_email_alerts(self, repository: Repository, strings_displayed=None, strings_not_displayed=None) -> None: repository_id = repository.id diff --git a/lib/tool_shed/test/functional/test_0000_basic_repository_features.py b/lib/tool_shed/test/functional/test_0000_basic_repository_features.py index 1204b7cc6a4..c6900443703 100644 --- a/lib/tool_shed/test/functional/test_0000_basic_repository_features.py +++ b/lib/tool_shed/test/functional/test_0000_basic_repository_features.py @@ -73,7 +73,6 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): def test_0040_verify_repository(self): """Display basic repository pages""" repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) - latest_changeset_revision = self.get_repository_tip(repository) self.check_for_valid_tools(repository, strings_displayed=["Filter1"]) self.check_count_of_metadata_revisions_associated_with_repository(repository, metadata_count=1) tip = self.get_repository_tip(repository) @@ -97,11 +96,6 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): repository, strings_displayed=[f"Repository '{repository.name}' revision", "(repository tip)"] ) strings = ["Uploaded filtering 1.1.0"] - if self._browser.is_twill: - # this appears in a link - it isn't how one would check this - # in playwright. But also we're testing the mercurial page - # here so this is probably a questionable check overall. - strings += [latest_changeset_revision] self.display_repository_clone_page( common.test_user_1_name, repository_name, @@ -112,23 +106,13 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): """Upload filtering.txt file associated with tool version 1.1.0.""" repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) self.add_file_to_repository(repository, "filtering/filtering_0000.txt") - expected = self._escape_page_content_if_needed("Readme file for filtering 1.1.0") + expected = "Readme file for filtering 1.1.0" self.display_manage_repository_page(repository, strings_displayed=[expected]) def test_0060_upload_filtering_test_data(self): """Upload filtering test data.""" repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) self.add_tar_to_repository(repository, "filtering/filtering_test_data.tar") - if self._browser.is_twill: - # probably not porting this functionality - just test - # with Twill for older UI and drop when that is all dropped - self.display_repository_file_contents( - repository=repository, - filename="1.bed", - filepath="test-data", - strings_displayed=[], - strings_not_displayed=[], - ) self.check_repository_metadata(repository, tip_only=True) def test_0065_upload_filtering_2_2_0(self): @@ -165,10 +149,10 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): """Upload readme.txt file associated with tool version 2.2.0.""" repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) self.add_file_to_repository(repository, "readme.txt") - content = self._escape_page_content_if_needed("This is a readme file.") + content = "This is a readme file." self.display_manage_repository_page(repository, strings_displayed=[content]) # Verify that there is a different readme file for each metadata revision. - readme_content = self._escape_page_content_if_needed("Readme file for filtering 1.1.0") + readme_content = "Readme file for filtering 1.1.0" self.display_manage_repository_page( repository, strings_displayed=[ @@ -182,7 +166,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) self.delete_files_from_repository(repository, filenames=["readme.txt"]) self.check_count_of_metadata_revisions_associated_with_repository(repository, metadata_count=2) - readme_content = self._escape_page_content_if_needed("Readme file for filtering 1.1.0") + readme_content = "Readme file for filtering 1.1.0" self.display_manage_repository_page(repository, strings_displayed=[readme_content]) def test_0090_verify_repository_metadata(self): @@ -223,7 +207,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) # Upload readme.txt to the filtering_0000 repository and verify that it is now displayed. self.add_file_to_repository(repository, "filtering/readme.txt") - content = self._escape_page_content_if_needed("These characters should not") + content = "These characters should not" self.display_manage_repository_page(repository, strings_displayed=[content]) def test_0130_verify_handling_of_invalid_characters(self): @@ -241,7 +225,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): break # Check for the changeset revision, repository name, owner username, 'repos' in the clone url, and the captured # unicode decoding error message. - content = self._escape_page_content_if_needed("These characters should not") + content = "These characters should not" strings_displayed = [ f"{revision_number}:{revision_hash}", "filtering_0000", @@ -265,10 +249,7 @@ class TestBasicRepositoryFeatures(ShedTwillTestCase): repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name) encoded_repository_id = repository.id assert encoded_repository_id - strings_displayed = ["Invalid+changeset+revision"] view_repo_url = ( f"/repository/view_repository?id={encoded_repository_id}&changeset_revision=nonsensical_changeset" ) self.visit_url(view_repo_url) - if self._browser.is_twill: - self.check_for_strings(strings_displayed=strings_displayed, strings_not_displayed=[]) diff --git a/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py b/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py index f859e31b08f..21c21f353b4 100644 --- a/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py +++ b/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py @@ -116,7 +116,7 @@ class TestRepositoryCitableURLs(ShedTwillTestCase): strings_displayed_in_iframe = [ "user1", "filtering_0420", - self._escape_page_content_if_needed(repository_long_description), + repository_long_description, ] strings_displayed_in_iframe.append(self.get_repository_tip(repository)) self.load_citable_url( @@ -147,7 +147,7 @@ class TestRepositoryCitableURLs(ShedTwillTestCase): strings_displayed_in_iframe = [ "user1", "filtering_0420", - self._escape_page_content_if_needed(repository_long_description), + repository_long_description, first_changeset_hash, ] self.load_citable_url( diff --git a/packages/tool_shed/setup.cfg b/packages/tool_shed/setup.cfg index f3480cfa0f7..46e5ac1d75e 100644 --- a/packages/tool_shed/setup.cfg +++ b/packages/tool_shed/setup.cfg @@ -57,7 +57,6 @@ install_requires = slowapi starlette starlette-context - twill typing-extensions WebOb Whoosh @@ -65,7 +64,7 @@ packages = find: python_requires = >=3.10 [options.extras_require] -test = +test = pytest [options.packages.find] From 9988734961ecfa2e3b6fe2b7593f4b52bd6828c5 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 20 Feb 2026 10:28:50 -0500 Subject: [PATCH 2/5] =?UTF-8?q?7d:=20Rename=20ShedTwillTestCase=20?= =?UTF-8?q?=E2=86=92=20ShedTestCase=20(complete)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename class ShedTwillTestCase → ShedTestCase in twilltestcase.py - Rename file twilltestcase.py → testcase.py - Update all imports across 52 functional test files - Update references in base test infrastructure (driver.py, playwrightbrowser.py, playwrighttestcase.py) - Update docstring in ShedTestCase mentioning Twill (outdated after Phase 6) - Update lib/tool_shed/test/README.md and lib/tool_shed/test/base/README.md - Update SHED_CLEANUP.md to reflect completion Files changed: 56 Primarily import/class name changes; no logic modifications. Co-Authored-By: Claude Opus 4.6 --- lib/tool_shed/test/README.md | 4 ++-- lib/tool_shed/test/base/README.md | 6 +++--- lib/tool_shed/test/base/driver.py | 2 +- lib/tool_shed/test/base/playwrightbrowser.py | 2 +- lib/tool_shed/test/base/playwrighttestcase.py | 4 ++-- lib/tool_shed/test/base/{twilltestcase.py => testcase.py} | 8 ++++---- .../functional/test_0000_basic_repository_features.py | 4 ++-- .../test_0010_repository_with_tool_dependencies.py | 4 ++-- .../functional/test_0020_basic_repository_dependencies.py | 4 ++-- .../test_0030_repository_dependency_revisions.py | 4 ++-- .../test_0040_repository_circular_dependencies.py | 4 ++-- .../test_0050_circular_dependencies_4_levels.py | 4 ++-- lib/tool_shed/test/functional/test_0070_invalid_tool.py | 4 ++-- .../test_0080_advanced_circular_dependencies.py | 4 ++-- lib/tool_shed/test/functional/test_0090_tool_search.py | 4 ++-- .../test_0100_complex_repository_dependencies.py | 4 ++-- .../test_0110_invalid_simple_repository_dependencies.py | 4 ++-- ...t_0120_simple_repository_dependency_multiple_owners.py | 4 ++-- .../test/functional/test_0140_tool_help_images.py | 4 ++-- .../functional/test_0150_prior_installation_required.py | 4 ++-- .../test_0160_circular_prior_installation_required.py | 4 ++-- .../test_0170_complex_prior_installation_required.py | 4 ++-- .../test/functional/test_0300_reset_all_metadata.py | 4 ++-- .../test/functional/test_0310_hg_api_features.py | 4 ++-- .../functional/test_0420_citable_urls_for_repositories.py | 4 ++-- .../test/functional/test_0430_browse_utilities.py | 4 ++-- .../test_0440_deleting_dependency_definitions.py | 4 ++-- .../test/functional/test_0460_upload_to_repository.py | 4 ++-- .../test_0470_tool_dependency_repository_type.py | 4 ++-- .../test_0480_tool_dependency_xml_verification.py | 4 ++-- .../test/functional/test_0530_repository_admin_feature.py | 4 ++-- .../functional/test_0550_metadata_updated_dependencies.py | 4 ++-- .../test/functional/test_1000_install_basic_repository.py | 4 ++-- ...test_1010_install_repository_with_tool_dependencies.py | 4 ++-- ...020_install_repository_with_repository_dependencies.py | 4 ++-- ...t_1030_install_repository_with_dependency_revisions.py | 4 ++-- ...1040_install_repository_basic_circular_dependencies.py | 4 ++-- .../test_1050_circular_dependencies_4_levels.py | 4 ++-- lib/tool_shed/test/functional/test_1070_invalid_tool.py | 4 ++-- ...test_1080_advanced_circular_dependency_installation.py | 4 ++-- .../test_1090_repository_dependency_handling.py | 4 ++-- .../test_1100_install_updated_repository_dependencies.py | 4 ++-- ...t_1120_install_repository_with_complex_dependencies.py | 4 ++-- ...stall_repository_with_invalid_repository_dependency.py | 4 ++-- ...t_1140_simple_repository_dependency_multiple_owners.py | 4 ++-- .../test/functional/test_1160_tool_help_images.py | 4 ++-- .../functional/test_1170_prior_installation_required.py | 4 ++-- .../test_1180_circular_prior_installation_required.py | 4 ++-- .../test_1190_complex_prior_installation_required.py | 4 ++-- .../test_1200_uninstall_and_reinstall_basic_repository.py | 4 ++-- ...install_reinstall_repository_with_tool_dependencies.py | 4 ++-- ...tall_reinstall_repository_with_dependency_revisions.py | 4 ++-- .../test/functional/test_1300_reset_all_metadata.py | 4 ++-- lib/tool_shed/test/functional/test_1410_update_manager.py | 4 ++-- .../functional/test_1430_repair_installed_repository.py | 4 ++-- lib/tool_shed/test/functional/test_1460_data_managers.py | 4 ++-- .../test_1470_updating_installed_repositories.py | 4 ++-- 57 files changed, 115 insertions(+), 115 deletions(-) rename lib/tool_shed/test/base/{twilltestcase.py => testcase.py} (99%) diff --git a/lib/tool_shed/test/README.md b/lib/tool_shed/test/README.md index d48f101e844..fb5c6f943a4 100644 --- a/lib/tool_shed/test/README.md +++ b/lib/tool_shed/test/README.md @@ -52,9 +52,9 @@ Modern Playwright/API tests: ### API Tests (ShedApiTestCase) ```python -from tool_shed.test.base.twilltestcase import ShedTwillTestCase +from tool_shed.test.base.testcase import ShedTestCase -class TestMyFeature(ShedTwillTestCase): +class TestMyFeature(ShedTestCase): def test_create_repo(self): category = self.create_category(name="Test") repo = self.get_or_create_repository( diff --git a/lib/tool_shed/test/base/README.md b/lib/tool_shed/test/base/README.md index ea53786ad6e..4a2e1f6ea0b 100644 --- a/lib/tool_shed/test/base/README.md +++ b/lib/tool_shed/test/base/README.md @@ -7,7 +7,7 @@ Base classes and utilities for Tool Shed functional tests. ``` base/ ├── driver.py # ToolShedTestDriver - embedded server setup -├── twilltestcase.py # ShedTwillTestCase - main test base class +├── testcase.py # ShedTestCase - main test base class ├── playwrighttestcase.py # PlaywrightTestCase - browser test base ├── playwrightbrowser.py # PlaywrightShedBrowser - browser abstraction ├── browser.py # ShedBrowser protocol @@ -19,12 +19,12 @@ base/ ## Base Classes -### ShedTwillTestCase +### ShedTestCase Main test base class with repository/category management: ```python -class TestFeature(ShedTwillTestCase): +class TestFeature(ShedTestCase): def test_repo_creation(self): category = self.create_category(name="Tools") repo = self.get_or_create_repository( diff --git a/lib/tool_shed/test/base/driver.py b/lib/tool_shed/test/base/driver.py index aa5f1f418c9..d5cc67f6b17 100644 --- a/lib/tool_shed/test/base/driver.py +++ b/lib/tool_shed/test/base/driver.py @@ -157,7 +157,7 @@ class ToolShedTestDriver(driver_util.TestDriver): tool_shed_test_port = tool_shed_server_wrapper.port log.info(f"Functional tests will be run against {tool_shed_test_host}:{tool_shed_test_port}") - # Used by get_filename in tool shed's twilltestcase + # Used by get_filename in tool shed's testcase if "TOOL_SHED_TEST_FILE_DIR" not in os.environ: os.environ["TOOL_SHED_TEST_FILE_DIR"] = driver_util.TOOL_SHED_TEST_DATA diff --git a/lib/tool_shed/test/base/playwrightbrowser.py b/lib/tool_shed/test/base/playwrightbrowser.py index 0d0fca62b72..d5d8ec14db3 100644 --- a/lib/tool_shed/test/base/playwrightbrowser.py +++ b/lib/tool_shed/test/base/playwrightbrowser.py @@ -76,7 +76,7 @@ class PlaywrightShedBrowser(ShedBrowser): from galaxy.util import smart_str - with tempfile.NamedTemporaryFile(suffix=suffix, prefix="twilltestcase-", delete=False) as fh: + with tempfile.NamedTemporaryFile(suffix=suffix, prefix="testcase-", delete=False) as fh: fh.write(smart_str(content)) return fh.name diff --git a/lib/tool_shed/test/base/playwrighttestcase.py b/lib/tool_shed/test/base/playwrighttestcase.py index 5b5cba86554..6d75a6d331a 100644 --- a/lib/tool_shed/test/base/playwrighttestcase.py +++ b/lib/tool_shed/test/base/playwrighttestcase.py @@ -5,12 +5,12 @@ from pathlib import Path from playwright.sync_api import Page from .playwrightbrowser import PlaywrightShedBrowser -from .twilltestcase import ShedTwillTestCase +from .testcase import ShedTestCase SCREENSHOT_DIR_ENV = "TOOL_SHED_TEST_SCREENSHOTS" -class PlaywrightTestCase(ShedTwillTestCase): +class PlaywrightTestCase(ShedTestCase): """Base class for Playwright-based frontend tests.""" @property diff --git a/lib/tool_shed/test/base/twilltestcase.py b/lib/tool_shed/test/base/testcase.py similarity index 99% rename from lib/tool_shed/test/base/twilltestcase.py rename to lib/tool_shed/test/base/testcase.py index adeb4224b40..50ee7210d57 100644 --- a/lib/tool_shed/test/base/twilltestcase.py +++ b/lib/tool_shed/test/base/testcase.py @@ -192,7 +192,7 @@ class ToolShedInstallationClient(metaclass=abc.ABCMeta): class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): """A Galaxy API + Database as a installation target for the tool shed.""" - def __init__(self, testcase: "ShedTwillTestCase"): + def __init__(self, testcase: "ShedTestCase"): self.testcase = testcase self._session = requests.Session() self._last_page_content = "" @@ -453,7 +453,7 @@ class GalaxyInteractorToolShedInstallationClient(ToolShedInstallationClient): class StandaloneToolShedInstallationClient(ToolShedInstallationClient): - def __init__(self, testcase: "ShedTwillTestCase"): + def __init__(self, testcase: "ShedTestCase"): self.testcase = testcase self.temp_directory = Path(tempfile.mkdtemp(prefix="toolshedtestinstalltarget")) tool_shed_target = ToolShedTarget( @@ -616,7 +616,7 @@ class StandaloneToolShedInstallationClient(ToolShedInstallationClient): @pytest.mark.usefixtures("shed_browser") -class ShedTwillTestCase(ShedApiTestCase): +class ShedTestCase(ShedApiTestCase): """Class of FunctionalTestCase geared toward HTML interactions using the Twill library.""" requires_galaxy: bool = False @@ -835,7 +835,7 @@ class ShedTwillTestCase(ShedApiTestCase): return self._browser.visit_url(url, allowed_codes=allowed_codes) def write_temp_file(self, content, suffix=".html"): - with tempfile.NamedTemporaryFile(suffix=suffix, prefix="twilltestcase-", delete=False) as fh: + with tempfile.NamedTemporaryFile(suffix=suffix, prefix="testcase-", delete=False) as fh: fh.write(smart_str(content)) return fh.name diff --git a/lib/tool_shed/test/functional/test_0000_basic_repository_features.py b/lib/tool_shed/test/functional/test_0000_basic_repository_features.py index c6900443703..33d6a003d81 100644 --- a/lib/tool_shed/test/functional/test_0000_basic_repository_features.py +++ b/lib/tool_shed/test/functional/test_0000_basic_repository_features.py @@ -3,7 +3,7 @@ import logging import pytest from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase repository_name = "filtering_0000" repository_description = "Galaxy's filtering tool for test 0000" @@ -12,7 +12,7 @@ repository_long_description = "Long description of Galaxy's filtering tool for t log = logging.getLogger(__name__) -class TestBasicRepositoryFeatures(ShedTwillTestCase): +class TestBasicRepositoryFeatures(ShedTestCase): """Test core repository features.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py b/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py index a666ee12435..35a62604cad 100644 --- a/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py +++ b/lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py @@ -1,7 +1,7 @@ import os from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase repository_name = "freebayes_0010" repository_description = "Galaxy's freebayes tool" @@ -18,7 +18,7 @@ repository_long_description = "Long description of Galaxy's freebayes tool" """ -class TestFreebayesRepository(ShedTwillTestCase): +class TestFreebayesRepository(ShedTestCase): """Testing freebayes with tool data table entries, .loc files, and tool dependencies.""" def test_0000_create_or_login_admin_user(self): diff --git a/lib/tool_shed/test/functional/test_0020_basic_repository_dependencies.py b/lib/tool_shed/test/functional/test_0020_basic_repository_dependencies.py index 231167b8072..9c80f8b4551 100644 --- a/lib/tool_shed/test/functional/test_0020_basic_repository_dependencies.py +++ b/lib/tool_shed/test/functional/test_0020_basic_repository_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0020" column_maker_repository_description = "A flexible aligner." @@ -10,7 +10,7 @@ emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools for test 0020" -class TestBasicRepositoryDependencies(ShedTwillTestCase): +class TestBasicRepositoryDependencies(ShedTestCase): """Testing emboss 5 with repository dependencies.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0030_repository_dependency_revisions.py b/lib/tool_shed/test/functional/test_0030_repository_dependency_revisions.py index d64d6450c12..a50f156e85f 100644 --- a/lib/tool_shed/test/functional/test_0030_repository_dependency_revisions.py +++ b/lib/tool_shed/test/functional/test_0030_repository_dependency_revisions.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0030" column_maker_repository_description = "Add column" @@ -12,7 +12,7 @@ emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools for test 0030" -class TestRepositoryDependencyRevisions(ShedTwillTestCase): +class TestRepositoryDependencyRevisions(ShedTestCase): """Test dependencies on different revisions of a repository.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0040_repository_circular_dependencies.py b/lib/tool_shed/test/functional/test_0040_repository_circular_dependencies.py index eb17d97282c..f822a117eae 100644 --- a/lib/tool_shed/test/functional/test_0040_repository_circular_dependencies.py +++ b/lib/tool_shed/test/functional/test_0040_repository_circular_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase freebayes_repository_name = "freebayes_0040" freebayes_repository_description = "Galaxy's freebayes tool for test 0040" @@ -13,7 +13,7 @@ CATEGORY_NAME = "test_0040_repository_circular_dependencies" CATEGORY_DESC = "Testing handling of circular repository dependencies." -class TestRepositoryCircularDependencies(ShedTwillTestCase): +class TestRepositoryCircularDependencies(ShedTestCase): """Verify that the code correctly displays repositories with circular repository dependencies.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0050_circular_dependencies_4_levels.py b/lib/tool_shed/test/functional/test_0050_circular_dependencies_4_levels.py index 97a4eaa9c03..bb3ea1236e7 100644 --- a/lib/tool_shed/test/functional/test_0050_circular_dependencies_4_levels.py +++ b/lib/tool_shed/test/functional/test_0050_circular_dependencies_4_levels.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase emboss_repository_name = "emboss_0050" emboss_repository_description = "Galaxy's emboss tool" @@ -29,7 +29,7 @@ category_name = "Test 0050 Circular Dependencies 5 Levels" category_description = "Test circular dependency features" -class TestRepositoryCircularDependenciesToNLevels(ShedTwillTestCase): +class TestRepositoryCircularDependenciesToNLevels(ShedTestCase): """Verify that the code correctly handles circular dependencies down to n levels.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0070_invalid_tool.py b/lib/tool_shed/test/functional/test_0070_invalid_tool.py index cc164c838ec..4b1f9940fed 100644 --- a/lib/tool_shed/test/functional/test_0070_invalid_tool.py +++ b/lib/tool_shed/test/functional/test_0070_invalid_tool.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase repository_name = "bismark_0070" repository_description = "Galaxy's bismark wrapper" @@ -8,7 +8,7 @@ category_name = "Test 0070 Invalid Tool Revisions" category_description = "Tests for a repository with invalid tool revisions." -class TestBismarkRepository(ShedTwillTestCase): +class TestBismarkRepository(ShedTestCase): """Testing bismark with valid and invalid tool entries.""" def test_0000_create_or_login_admin_user(self): diff --git a/lib/tool_shed/test/functional/test_0080_advanced_circular_dependencies.py b/lib/tool_shed/test/functional/test_0080_advanced_circular_dependencies.py index 8223284dd49..fe7ea8c9ac4 100644 --- a/lib/tool_shed/test/functional/test_0080_advanced_circular_dependencies.py +++ b/lib/tool_shed/test/functional/test_0080_advanced_circular_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_repository_name = "column_maker_0080" column_repository_description = "Add column" @@ -13,7 +13,7 @@ category_name = "Test 0080 Advanced Circular Dependencies" category_description = "Test circular dependency features" -class TestRepositoryCircularDependencies(ShedTwillTestCase): +class TestRepositoryCircularDependencies(ShedTestCase): """Verify that the code correctly handles circular dependencies.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0090_tool_search.py b/lib/tool_shed/test/functional/test_0090_tool_search.py index adea223bdb7..cf7a4706479 100644 --- a/lib/tool_shed/test/functional/test_0090_tool_search.py +++ b/lib/tool_shed/test/functional/test_0090_tool_search.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase emboss_repository_name = "emboss_0090" emboss_repository_description = "Galaxy's emboss tool" @@ -25,7 +25,7 @@ category_name = "Test 0090 Tool Search And Installation" category_description = "Test 0090 Tool Search And Installation" -class TestRepositoryCircularDependenciesAgain(ShedTwillTestCase): +class TestRepositoryCircularDependenciesAgain(ShedTestCase): """Test more features related to repository dependencies.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0100_complex_repository_dependencies.py b/lib/tool_shed/test/functional/test_0100_complex_repository_dependencies.py index 6b39191aeba..3216938367d 100644 --- a/lib/tool_shed/test/functional/test_0100_complex_repository_dependencies.py +++ b/lib/tool_shed/test/functional/test_0100_complex_repository_dependencies.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -19,7 +19,7 @@ category_name = "Test 0100 Complex Repository Dependencies" category_description = "Test 0100 Complex Repository Dependencies" -class TestComplexRepositoryDependencies(ShedTwillTestCase): +class TestComplexRepositoryDependencies(ShedTestCase): """Test features related to complex repository dependencies.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0110_invalid_simple_repository_dependencies.py b/lib/tool_shed/test/functional/test_0110_invalid_simple_repository_dependencies.py index 032a1ccc9f2..10254c170ef 100644 --- a/lib/tool_shed/test/functional/test_0110_invalid_simple_repository_dependencies.py +++ b/lib/tool_shed/test/functional/test_0110_invalid_simple_repository_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0110" column_maker_repository_description = "A flexible aligner." @@ -13,7 +13,7 @@ category_name = "Test 0110 Invalid Repository Dependencies" category_desc = "Test 0110 Invalid Repository Dependencies" -class TestBasicRepositoryDependencies(ShedTwillTestCase): +class TestBasicRepositoryDependencies(ShedTestCase): """Testing emboss 5 with repository dependencies.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0120_simple_repository_dependency_multiple_owners.py b/lib/tool_shed/test/functional/test_0120_simple_repository_dependency_multiple_owners.py index 9cf172da1ed..dcae1d291c7 100644 --- a/lib/tool_shed/test/functional/test_0120_simple_repository_dependency_multiple_owners.py +++ b/lib/tool_shed/test/functional/test_0120_simple_repository_dependency_multiple_owners.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase datatypes_repository_name = "blast_datatypes_0120" datatypes_repository_description = "Galaxy applicable datatypes for BLAST" @@ -21,7 +21,7 @@ Tool shed side: """ -class TestRepositoryMultipleOwners(ShedTwillTestCase): +class TestRepositoryMultipleOwners(ShedTestCase): def test_0000_initiate_users(self): """Create necessary user accounts and login as an admin user. diff --git a/lib/tool_shed/test/functional/test_0140_tool_help_images.py b/lib/tool_shed/test/functional/test_0140_tool_help_images.py index 6fdd6050f46..eff7121ad03 100644 --- a/lib/tool_shed/test/functional/test_0140_tool_help_images.py +++ b/lib/tool_shed/test/functional/test_0140_tool_help_images.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -22,7 +22,7 @@ src="/repository/static/images//count_modes.png" """ -class TestToolHelpImages(ShedTwillTestCase): +class TestToolHelpImages(ShedTestCase): """Test features related to tool help images.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0150_prior_installation_required.py b/lib/tool_shed/test/functional/test_0150_prior_installation_required.py index e87804e37ee..faeb25ebebc 100644 --- a/lib/tool_shed/test/functional/test_0150_prior_installation_required.py +++ b/lib/tool_shed/test/functional/test_0150_prior_installation_required.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_repository_name = "column_maker_0150" column_repository_description = "Add column" @@ -27,7 +27,7 @@ Verify that convert_chars was installed first, contrary to the ordering that wou """ -class TestSimplePriorInstallation(ShedTwillTestCase): +class TestSimplePriorInstallation(ShedTestCase): """Test features related to datatype converters.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0160_circular_prior_installation_required.py b/lib/tool_shed/test/functional/test_0160_circular_prior_installation_required.py index e48253aa9b0..21cf365d34c 100644 --- a/lib/tool_shed/test/functional/test_0160_circular_prior_installation_required.py +++ b/lib/tool_shed/test/functional/test_0160_circular_prior_installation_required.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase filter_repository_name = "filtering_0160" filter_repository_description = "Galaxy's filtering tool for test 0160" @@ -26,7 +26,7 @@ Verify display. """ -class TestSimplePriorInstallation(ShedTwillTestCase): +class TestSimplePriorInstallation(ShedTestCase): """Test features related to datatype converters.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0170_complex_prior_installation_required.py b/lib/tool_shed/test/functional/test_0170_complex_prior_installation_required.py index f9a519b4a0f..552f3362659 100644 --- a/lib/tool_shed/test/functional/test_0170_complex_prior_installation_required.py +++ b/lib/tool_shed/test/functional/test_0170_complex_prior_installation_required.py @@ -1,7 +1,7 @@ import os from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase matplotlib_repository_name = "package_matplotlib_1_2_0170" matplotlib_repository_description = ( @@ -29,7 +29,7 @@ category_description = "Test 0170 Prior Installation Complex Dependencies" """ -class TestComplexPriorInstallation(ShedTwillTestCase): +class TestComplexPriorInstallation(ShedTestCase): """Test features related to datatype converters.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py b/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py index 777763cb0cb..6442a72b28f 100644 --- a/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py +++ b/lib/tool_shed/test/functional/test_0300_reset_all_metadata.py @@ -1,7 +1,7 @@ import pytest from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0020" column_maker_repository_description = "A flexible aligner." @@ -40,7 +40,7 @@ category_0050_description = "Test circular dependency features" running_standalone = False -class TestResetAllRepositoryMetadata(ShedTwillTestCase): +class TestResetAllRepositoryMetadata(ShedTestCase): """Verify that the "Reset selected metadata" feature works.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0310_hg_api_features.py b/lib/tool_shed/test/functional/test_0310_hg_api_features.py index 9bc20e5198d..8168ea86c20 100644 --- a/lib/tool_shed/test/functional/test_0310_hg_api_features.py +++ b/lib/tool_shed/test/functional/test_0310_hg_api_features.py @@ -2,7 +2,7 @@ import logging import os from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -19,7 +19,7 @@ category_description = "Test 0310 for verifying the tool shed http interface to """ -class TestHgWebFeatures(ShedTwillTestCase): +class TestHgWebFeatures(ShedTestCase): """Test http mercurial interface.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py b/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py index 21c21f353b4..3b3d3a57f51 100644 --- a/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py +++ b/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -25,7 +25,7 @@ first_changeset_hash = "" """ -class TestRepositoryCitableURLs(ShedTwillTestCase): +class TestRepositoryCitableURLs(ShedTestCase): """Test repository citable url features.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0430_browse_utilities.py b/lib/tool_shed/test/functional/test_0430_browse_utilities.py index 512d0048d26..cd7d9f4b864 100644 --- a/lib/tool_shed/test/functional/test_0430_browse_utilities.py +++ b/lib/tool_shed/test/functional/test_0430_browse_utilities.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -21,7 +21,7 @@ freebayes_repository_long_description = "Long description of Freebayes tool for """ -class TestToolShedBrowseUtilities(ShedTwillTestCase): +class TestToolShedBrowseUtilities(ShedTestCase): """Test browsing for Galaxy utilities.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0440_deleting_dependency_definitions.py b/lib/tool_shed/test/functional/test_0440_deleting_dependency_definitions.py index 045b5ce9aff..b4dd24e5f3f 100644 --- a/lib/tool_shed/test/functional/test_0440_deleting_dependency_definitions.py +++ b/lib/tool_shed/test/functional/test_0440_deleting_dependency_definitions.py @@ -1,6 +1,6 @@ from tool_shed_client.schema import Repository from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_repository_name = "column_maker_0440" column_repository_description = "Add column" @@ -50,7 +50,7 @@ Tool dependencies: """ -class TestDeletedDependencies(ShedTwillTestCase): +class TestDeletedDependencies(ShedTestCase): """Test metadata setting when dependency definitions are deleted.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0460_upload_to_repository.py b/lib/tool_shed/test/functional/test_0460_upload_to_repository.py index e6ed21b4856..daca098d959 100644 --- a/lib/tool_shed/test/functional/test_0460_upload_to_repository.py +++ b/lib/tool_shed/test/functional/test_0460_upload_to_repository.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -54,7 +54,7 @@ For all steps, verify that the generated dependency points to the tip of the spe """ -class TestAutomaticDependencyRevision(ShedTwillTestCase): +class TestAutomaticDependencyRevision(ShedTestCase): """Test defining repository dependencies without specifying the changeset revision.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0470_tool_dependency_repository_type.py b/lib/tool_shed/test/functional/test_0470_tool_dependency_repository_type.py index 2b5f966a475..b93c1f6ed4b 100644 --- a/lib/tool_shed/test/functional/test_0470_tool_dependency_repository_type.py +++ b/lib/tool_shed/test/functional/test_0470_tool_dependency_repository_type.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -60,7 +60,7 @@ emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 t """ -class TestEnvironmentInheritance(ShedTwillTestCase): +class TestEnvironmentInheritance(ShedTestCase): """Test referencing environment variables that were defined in a separate tool dependency.""" def test_0000_initiate_users_and_category(self): diff --git a/lib/tool_shed/test/functional/test_0480_tool_dependency_xml_verification.py b/lib/tool_shed/test/functional/test_0480_tool_dependency_xml_verification.py index 2fd183c8d10..e1ac47476bc 100644 --- a/lib/tool_shed/test/functional/test_0480_tool_dependency_xml_verification.py +++ b/lib/tool_shed/test/functional/test_0480_tool_dependency_xml_verification.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -20,7 +20,7 @@ repository_long_description = "This repository is in the test suite 0480" """ -class TestDependencyDefinitionValidation(ShedTwillTestCase): +class TestDependencyDefinitionValidation(ShedTestCase): """Test the tool shed's tool dependency XML validation.""" def test_0000_initiate_users_and_category(self): diff --git a/lib/tool_shed/test/functional/test_0530_repository_admin_feature.py b/lib/tool_shed/test/functional/test_0530_repository_admin_feature.py index 56887178629..4b7dc6dc360 100644 --- a/lib/tool_shed/test/functional/test_0530_repository_admin_feature.py +++ b/lib/tool_shed/test/functional/test_0530_repository_admin_feature.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -31,7 +31,7 @@ category_description = "Verify the functionality of the code that handles the re """ -class TestRepositoryAdminRole(ShedTwillTestCase): +class TestRepositoryAdminRole(ShedTestCase): """Verify that the code correctly handles the repository admin role.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_0550_metadata_updated_dependencies.py b/lib/tool_shed/test/functional/test_0550_metadata_updated_dependencies.py index 3835834036a..f6076517b03 100644 --- a/lib/tool_shed/test/functional/test_0550_metadata_updated_dependencies.py +++ b/lib/tool_shed/test/functional/test_0550_metadata_updated_dependencies.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -43,7 +43,7 @@ category_description = "Verify metadata updates" """ -class TestGetUpdatedMetadata(ShedTwillTestCase): +class TestGetUpdatedMetadata(ShedTestCase): """Verify that updated repositories still have correct dependency links.""" def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_1000_install_basic_repository.py b/lib/tool_shed/test/functional/test_1000_install_basic_repository.py index b9c4ef4c0f1..103e156f4fa 100644 --- a/lib/tool_shed/test/functional/test_1000_install_basic_repository.py +++ b/lib/tool_shed/test/functional/test_1000_install_basic_repository.py @@ -1,11 +1,11 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase repo_name = "filtering_0000" repo_description = "Galaxy's filtering tool" -class TestBasicToolShedFeatures(ShedTwillTestCase): +class TestBasicToolShedFeatures(ShedTestCase): """Test installing a basic repository.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1010_install_repository_with_tool_dependencies.py b/lib/tool_shed/test/functional/test_1010_install_repository_with_tool_dependencies.py index f0fb4128836..4e66f2b8b2d 100644 --- a/lib/tool_shed/test/functional/test_1010_install_repository_with_tool_dependencies.py +++ b/lib/tool_shed/test/functional/test_1010_install_repository_with_tool_dependencies.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase repository_name = "freebayes_0010" repository_description = "Galaxy's freebayes tool" @@ -10,7 +10,7 @@ category_name = "Test 0010 Repository With Tool Dependencies" log = logging.getLogger(__name__) -class TestToolWithToolDependencies(ShedTwillTestCase): +class TestToolWithToolDependencies(ShedTestCase): """Test installing a repository with tool dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1020_install_repository_with_repository_dependencies.py b/lib/tool_shed/test/functional/test_1020_install_repository_with_repository_dependencies.py index 28a88ab51e8..01b50f5fbbe 100644 --- a/lib/tool_shed/test/functional/test_1020_install_repository_with_repository_dependencies.py +++ b/lib/tool_shed/test/functional/test_1020_install_repository_with_repository_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0020" column_maker_repository_description = "A flexible aligner." @@ -10,7 +10,7 @@ emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools for test 0020" -class TestToolWithRepositoryDependencies(ShedTwillTestCase): +class TestToolWithRepositoryDependencies(ShedTestCase): """Test installing a repository with repository dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1030_install_repository_with_dependency_revisions.py b/lib/tool_shed/test/functional/test_1030_install_repository_with_dependency_revisions.py index 63b32f31ad1..36fb0148aa3 100644 --- a/lib/tool_shed/test/functional/test_1030_install_repository_with_dependency_revisions.py +++ b/lib/tool_shed/test/functional/test_1030_install_repository_with_dependency_revisions.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0030" column_maker_repository_description = "A flexible aligner." @@ -14,7 +14,7 @@ emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 t running_standalone = False -class TestRepositoryWithDependencyRevisions(ShedTwillTestCase): +class TestRepositoryWithDependencyRevisions(ShedTestCase): """Test installing a repository with dependency revisions.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1040_install_repository_basic_circular_dependencies.py b/lib/tool_shed/test/functional/test_1040_install_repository_basic_circular_dependencies.py index 1c01efe9415..a23d360a92f 100644 --- a/lib/tool_shed/test/functional/test_1040_install_repository_basic_circular_dependencies.py +++ b/lib/tool_shed/test/functional/test_1040_install_repository_basic_circular_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase freebayes_repository_name = "freebayes_0040" freebayes_repository_description = "Galaxy's freebayes tool for test 0040" @@ -14,7 +14,7 @@ category_name = "test_0040_repository_circular_dependencies" running_standalone = False -class TestInstallingCircularDependencies(ShedTwillTestCase): +class TestInstallingCircularDependencies(ShedTestCase): """Verify that the code correctly handles installing repositories with circular dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1050_circular_dependencies_4_levels.py b/lib/tool_shed/test/functional/test_1050_circular_dependencies_4_levels.py index f89c9cf4f55..b65a94dcf08 100644 --- a/lib/tool_shed/test/functional/test_1050_circular_dependencies_4_levels.py +++ b/lib/tool_shed/test/functional/test_1050_circular_dependencies_4_levels.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase emboss_repository_name = "emboss_0050" emboss_repository_description = "Galaxy's emboss tool" @@ -31,7 +31,7 @@ category_description = "Test circular dependency features" running_standalone = False -class TestInstallRepositoryCircularDependencies(ShedTwillTestCase): +class TestInstallRepositoryCircularDependencies(ShedTestCase): """Verify that the code correctly handles circular dependencies down to n levels.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1070_invalid_tool.py b/lib/tool_shed/test/functional/test_1070_invalid_tool.py index 0089a94a867..92b0f50b652 100644 --- a/lib/tool_shed/test/functional/test_1070_invalid_tool.py +++ b/lib/tool_shed/test/functional/test_1070_invalid_tool.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase repository_name = "bismark_0070" repository_description = "Galaxy's bismark wrapper" @@ -8,7 +8,7 @@ category_name = "Test 0070 Invalid Tool Revisions" category_description = "Test 1070 for a repository with an invalid tool." -class TestFreebayesRepository(ShedTwillTestCase): +class TestFreebayesRepository(ShedTestCase): """Test repository with multiple revisions with invalid tools.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1080_advanced_circular_dependency_installation.py b/lib/tool_shed/test/functional/test_1080_advanced_circular_dependency_installation.py index 783c6c7af51..8bdb999075d 100644 --- a/lib/tool_shed/test/functional/test_1080_advanced_circular_dependency_installation.py +++ b/lib/tool_shed/test/functional/test_1080_advanced_circular_dependency_installation.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_repository_name = "column_maker_0080" column_repository_description = "Add column" @@ -19,7 +19,7 @@ log = logging.getLogger(__name__) running_standalone = False -class TestRepositoryDependencies(ShedTwillTestCase): +class TestRepositoryDependencies(ShedTestCase): """Testing uninstalling and reinstalling repository dependencies, and setting tool panel sections.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1090_repository_dependency_handling.py b/lib/tool_shed/test/functional/test_1090_repository_dependency_handling.py index 192a5d72eda..1dd08117258 100644 --- a/lib/tool_shed/test/functional/test_1090_repository_dependency_handling.py +++ b/lib/tool_shed/test/functional/test_1090_repository_dependency_handling.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_repository_name = "column_maker_1085" column_repository_description = "Add column" @@ -17,7 +17,7 @@ category_description = "Test circular dependency features" log = logging.getLogger(__name__) -class TestRepositoryDependencies(ShedTwillTestCase): +class TestRepositoryDependencies(ShedTestCase): """Testing the behavior of repository dependencies with tool panel sections.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1100_install_updated_repository_dependencies.py b/lib/tool_shed/test/functional/test_1100_install_updated_repository_dependencies.py index fa88c45a336..9e0e997f5f1 100644 --- a/lib/tool_shed/test/functional/test_1100_install_updated_repository_dependencies.py +++ b/lib/tool_shed/test/functional/test_1100_install_updated_repository_dependencies.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_repository_name = "column_maker_1087" column_repository_description = "Add column" @@ -13,7 +13,7 @@ category_name = "Test 1087 Advanced Circular Dependencies" category_description = "Test circular dependency features" -class TestRepositoryDependencies(ShedTwillTestCase): +class TestRepositoryDependencies(ShedTestCase): """Test installing a repository, then updating it to include repository dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1120_install_repository_with_complex_dependencies.py b/lib/tool_shed/test/functional/test_1120_install_repository_with_complex_dependencies.py index 9dbc09c42f1..d2b11f16f81 100644 --- a/lib/tool_shed/test/functional/test_1120_install_repository_with_complex_dependencies.py +++ b/lib/tool_shed/test/functional/test_1120_install_repository_with_complex_dependencies.py @@ -1,7 +1,7 @@ import os from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase bwa_base_repository_name = "bwa_base_repository_0100" bwa_base_repository_description = "BWA Base" @@ -20,7 +20,7 @@ category_description = "Test 0100 Complex Repository Dependencies" running_standalone = False -class TestInstallingComplexRepositoryDependencies(ShedTwillTestCase): +class TestInstallingComplexRepositoryDependencies(ShedTestCase): """Test features related to installing repositories with complex repository dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1130_install_repository_with_invalid_repository_dependency.py b/lib/tool_shed/test/functional/test_1130_install_repository_with_invalid_repository_dependency.py index 168fe70d9ce..69bc9a212b7 100644 --- a/lib/tool_shed/test/functional/test_1130_install_repository_with_invalid_repository_dependency.py +++ b/lib/tool_shed/test/functional/test_1130_install_repository_with_invalid_repository_dependency.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0110" column_maker_repository_description = "A flexible aligner." @@ -14,7 +14,7 @@ category_desc = "Test 0110 Invalid Repository Dependencies" running_standalone = False -class TestBasicRepositoryDependencies(ShedTwillTestCase): +class TestBasicRepositoryDependencies(ShedTestCase): """Testing emboss 5 with repository dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1140_simple_repository_dependency_multiple_owners.py b/lib/tool_shed/test/functional/test_1140_simple_repository_dependency_multiple_owners.py index a50d92b7ed1..0a269ed3849 100644 --- a/lib/tool_shed/test/functional/test_1140_simple_repository_dependency_multiple_owners.py +++ b/lib/tool_shed/test/functional/test_1140_simple_repository_dependency_multiple_owners.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase datatypes_repository_name = "blast_datatypes_0120" datatypes_repository_description = "Galaxy applicable datatypes for BLAST" @@ -27,7 +27,7 @@ Galaxy side: running_standalone = False -class TestInstallRepositoryMultipleOwners(ShedTwillTestCase): +class TestInstallRepositoryMultipleOwners(ShedTestCase): requires_galaxy = True def test_0000_initiate_users(self): diff --git a/lib/tool_shed/test/functional/test_1160_tool_help_images.py b/lib/tool_shed/test/functional/test_1160_tool_help_images.py index dbc4d023a33..cd96af2bcbf 100644 --- a/lib/tool_shed/test/functional/test_1160_tool_help_images.py +++ b/lib/tool_shed/test/functional/test_1160_tool_help_images.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -18,7 +18,7 @@ category_description = "Test 0140 Tool Help Images" # src="/repository/static/images//count_modes.png" -class TestToolHelpImages(ShedTwillTestCase): +class TestToolHelpImages(ShedTestCase): """Test features related to tool help images.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1170_prior_installation_required.py b/lib/tool_shed/test/functional/test_1170_prior_installation_required.py index 5306115d102..61978a198e8 100644 --- a/lib/tool_shed/test/functional/test_1170_prior_installation_required.py +++ b/lib/tool_shed/test/functional/test_1170_prior_installation_required.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -33,7 +33,7 @@ Verify that convert_chars was installed first, contrary to the ordering that wou running_standalone = False -class TestSimplePriorInstallation(ShedTwillTestCase): +class TestSimplePriorInstallation(ShedTestCase): """Test features related to datatype converters.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1180_circular_prior_installation_required.py b/lib/tool_shed/test/functional/test_1180_circular_prior_installation_required.py index 8c2bfa5a316..d9003e0b87b 100644 --- a/lib/tool_shed/test/functional/test_1180_circular_prior_installation_required.py +++ b/lib/tool_shed/test/functional/test_1180_circular_prior_installation_required.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -46,7 +46,7 @@ Verify that convert_chars was installed first, contrary to the ordering that wou running_standalone = False -class TestSimplePriorInstallation(ShedTwillTestCase): +class TestSimplePriorInstallation(ShedTestCase): """Test features related to datatype converters.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1190_complex_prior_installation_required.py b/lib/tool_shed/test/functional/test_1190_complex_prior_installation_required.py index fdb8a354605..be23bf4e45a 100644 --- a/lib/tool_shed/test/functional/test_1190_complex_prior_installation_required.py +++ b/lib/tool_shed/test/functional/test_1190_complex_prior_installation_required.py @@ -1,7 +1,7 @@ import os from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase matplotlib_repository_name = "package_matplotlib_1_2_0170" matplotlib_repository_description = ( @@ -33,7 +33,7 @@ category_description = "Test 0170 Prior Installation Complex Dependencies" running_standalone = False -class TestComplexPriorInstallation(ShedTwillTestCase): +class TestComplexPriorInstallation(ShedTestCase): """Test features related to datatype converters.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1200_uninstall_and_reinstall_basic_repository.py b/lib/tool_shed/test/functional/test_1200_uninstall_and_reinstall_basic_repository.py index fa14115d406..125a1193af2 100644 --- a/lib/tool_shed/test/functional/test_1200_uninstall_and_reinstall_basic_repository.py +++ b/lib/tool_shed/test/functional/test_1200_uninstall_and_reinstall_basic_repository.py @@ -1,8 +1,8 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase -class TestUninstallingAndReinstallingRepositories(ShedTwillTestCase): +class TestUninstallingAndReinstallingRepositories(ShedTestCase): """Test uninstalling and reinstalling a basic repository.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py b/lib/tool_shed/test/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py index e67c1b3eb98..42a6e9c748b 100644 --- a/lib/tool_shed/test/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py +++ b/lib/tool_shed/test/functional/test_1210_uninstall_reinstall_repository_with_tool_dependencies.py @@ -1,10 +1,10 @@ import os from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase -class TestUninstallingAndReinstallingRepositories(ShedTwillTestCase): +class TestUninstallingAndReinstallingRepositories(ShedTestCase): """Test uninstalling and reinstalling a repository with tool dependencies.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py b/lib/tool_shed/test/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py index fdaaa8f7d00..5651a1c916a 100644 --- a/lib/tool_shed/test/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py +++ b/lib/tool_shed/test/functional/test_1230_uninstall_reinstall_repository_with_dependency_revisions.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0030" column_maker_repository_description = "Add column" @@ -14,7 +14,7 @@ emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 t running_standalone = False -class TestUninstallingAndReinstallingRepositories(ShedTwillTestCase): +class TestUninstallingAndReinstallingRepositories(ShedTestCase): """Test uninstalling and reinstalling a repository with repository dependency revisions.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1300_reset_all_metadata.py b/lib/tool_shed/test/functional/test_1300_reset_all_metadata.py index c4d963b5692..ce2cfd0504f 100644 --- a/lib/tool_shed/test/functional/test_1300_reset_all_metadata.py +++ b/lib/tool_shed/test/functional/test_1300_reset_all_metadata.py @@ -1,5 +1,5 @@ from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase column_maker_repository_name = "column_maker_0020" column_maker_repository_description = "A flexible aligner." @@ -39,7 +39,7 @@ repository_datatypes_count = 0 running_standalone = False -class TestResetInstalledRepositoryMetadata(ShedTwillTestCase): +class TestResetInstalledRepositoryMetadata(ShedTestCase): """Verify that the "Reset selected metadata" feature works.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1410_update_manager.py b/lib/tool_shed/test/functional/test_1410_update_manager.py index 6b00abf51d5..9e509ab694d 100644 --- a/lib/tool_shed/test/functional/test_1410_update_manager.py +++ b/lib/tool_shed/test/functional/test_1410_update_manager.py @@ -2,7 +2,7 @@ import logging import time from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -21,7 +21,7 @@ category_description = "Functional test suite to test the update manager." """ -class TestUpdateManager(ShedTwillTestCase): +class TestUpdateManager(ShedTestCase): """Test the Galaxy update manager.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1430_repair_installed_repository.py b/lib/tool_shed/test/functional/test_1430_repair_installed_repository.py index e1b7e6950a7..c1ba989a420 100644 --- a/lib/tool_shed/test/functional/test_1430_repair_installed_repository.py +++ b/lib/tool_shed/test/functional/test_1430_repair_installed_repository.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -32,7 +32,7 @@ In Galaxy: """ -class TestRepairRepository(ShedTwillTestCase): +class TestRepairRepository(ShedTestCase): """Test repairing an installed repository.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1460_data_managers.py b/lib/tool_shed/test/functional/test_1460_data_managers.py index b271e85c0f8..6a7c6d008b8 100644 --- a/lib/tool_shed/test/functional/test_1460_data_managers.py +++ b/lib/tool_shed/test/functional/test_1460_data_managers.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -25,7 +25,7 @@ data_manager_tar_file = "1460_files/data_manager_files/test_data_manager.tar" # TODO: Allow testing actual Execution of installed Data Manager Tool. -class TestDataManagers(ShedTwillTestCase): +class TestDataManagers(ShedTestCase): """Test installing a repository containing a Data Manager.""" requires_galaxy = True diff --git a/lib/tool_shed/test/functional/test_1470_updating_installed_repositories.py b/lib/tool_shed/test/functional/test_1470_updating_installed_repositories.py index 29de6460a40..fd62437d531 100644 --- a/lib/tool_shed/test/functional/test_1470_updating_installed_repositories.py +++ b/lib/tool_shed/test/functional/test_1470_updating_installed_repositories.py @@ -1,7 +1,7 @@ import logging from ..base import common -from ..base.twilltestcase import ShedTwillTestCase +from ..base.testcase import ShedTestCase log = logging.getLogger(__name__) @@ -24,7 +24,7 @@ category_description = ( """ -class TestUpdateInstalledRepository(ShedTwillTestCase): +class TestUpdateInstalledRepository(ShedTestCase): """Verify that the code correctly handles updating an installed repository, then uninstalling and reinstalling.""" requires_galaxy = True From 75ab5958c5fb0a70b814475789a76c733820c984 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 27 Feb 2026 15:30:24 -0500 Subject: [PATCH 3/5] Fix mypy errors in ShedTestCase Co-Authored-By: Claude Opus 4.6 --- lib/tool_shed/test/base/testcase.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/tool_shed/test/base/testcase.py b/lib/tool_shed/test/base/testcase.py index 50ee7210d57..dc372f60b7f 100644 --- a/lib/tool_shed/test/base/testcase.py +++ b/lib/tool_shed/test/base/testcase.py @@ -620,9 +620,7 @@ class ShedTestCase(ShedApiTestCase): """Class of FunctionalTestCase geared toward HTML interactions using the Twill library.""" requires_galaxy: bool = False - _installation_client: Optional[ - Union[StandaloneToolShedInstallationClient, GalaxyInteractorToolShedInstallationClient] - ] = None + _installation_client: Optional[ToolShedInstallationClient] = None __browser: Optional[ShedBrowser] = None def setUp(self): @@ -633,14 +631,16 @@ class ShedTestCase(ShedApiTestCase): self.hgweb_config_dir = os.environ.get("TEST_HG_WEB_CONFIG_DIR") self.hgweb_config_manager = hgweb_config.hgweb_config_manager self.hgweb_config_manager.hgweb_config_dir = self.hgweb_config_dir - self.tool_shed_test_tmp_dir = os.environ.get("TOOL_SHED_TEST_TMP_DIR", None) - self.file_dir = os.environ.get("TOOL_SHED_TEST_FILE_DIR", None) + self.tool_shed_test_tmp_dir: str = os.environ.get("TOOL_SHED_TEST_TMP_DIR", "") + self.file_dir: str = os.environ.get("TOOL_SHED_TEST_FILE_DIR", "") self.shed_tool_conf = os.environ.get("GALAXY_TEST_SHED_TOOL_CONF") self.test_db_util = test_db_util if os.environ.get("TOOL_SHED_TEST_INSTALL_CLIENT") == "standalone": # TODO: once nose is out of the way - try to get away without # instantiating the unused Galaxy server here. - installation_client_class = StandaloneToolShedInstallationClient + installation_client_class: Union[ + type[StandaloneToolShedInstallationClient], type[GalaxyInteractorToolShedInstallationClient] + ] = StandaloneToolShedInstallationClient full_stack_galaxy = False else: installation_client_class = GalaxyInteractorToolShedInstallationClient @@ -1526,7 +1526,7 @@ class ShedTestCase(ShedApiTestCase): def grant_role_to_user(self, user, role): strings_displayed = [self.security.encode_id(role.id), role.name] - strings_not_displayed = [] + strings_not_displayed: list[str] = [] self.visit_url("/admin/roles") self.check_for_strings(strings_displayed, strings_not_displayed) params = dict(operation="manage users and groups", id=self.security.encode_id(role.id)) @@ -1684,6 +1684,7 @@ class ShedTestCase(ShedApiTestCase): self.check_for_strings(strings_displayed, strings_not_displayed) def reactivate_repository(self, installed_repository): + assert self._installation_client self._installation_client.reactivate_repository(installed_repository) def reinstall_repository_api( @@ -1695,6 +1696,7 @@ class ShedTestCase(ShedApiTestCase): ): name = installed_repository.name owner = installed_repository.owner + assert self._installation_client self._installation_client.install_repository( name, owner, @@ -1808,10 +1810,12 @@ class ShedTestCase(ShedApiTestCase): @property def shed_tool_data_table_conf(self): + assert self._installation_client return self._installation_client.shed_tool_data_table_conf @property def tool_data_path(self): + assert self._installation_client return self._installation_client.tool_data_path def _refresh_tool_shed_repository(self, repo: galaxy_model.ToolShedRepository) -> None: @@ -1847,6 +1851,7 @@ class ShedTestCase(ShedApiTestCase): # # required_data_table_entry = None + assert data_tables is not None for table_elem in data_tables.findall("table"): # The value of table_elem will be something like: for required_data_table_entry in required_data_table_entries: @@ -1859,7 +1864,7 @@ class ShedTestCase(ShedApiTestCase): # The "path" attribute of the "file" tag is the location that Galaxy always uses because the # Galaxy ToolDataTableManager was implemented in such a way that the hard-coded path is used # rather than allowing the location to be a configurable setting like the tool shed requires. - file_path = file_elem.get("path", None) + file_path = file_elem.get("path", None) if file_elem is not None else None # The value of file_path will be something like: "tool-data/all_fasta.loc" assert ( file_path is not None From 0596b82a5859715f8511d03255d66cc9bb3d0fc3 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 28 Feb 2026 09:55:29 -0500 Subject: [PATCH 4/5] Remove twill dependency from pyproject.toml and pinned requirements Co-Authored-By: Claude Opus 4.6 --- lib/galaxy/dependencies/dev-requirements.txt | 1 - lib/galaxy/dependencies/pinned-test-requirements.txt | 1 - pyproject.toml | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/galaxy/dependencies/dev-requirements.txt b/lib/galaxy/dependencies/dev-requirements.txt index a59d5b4e25f..28c26a49138 100644 --- a/lib/galaxy/dependencies/dev-requirements.txt +++ b/lib/galaxy/dependencies/dev-requirements.txt @@ -210,7 +210,6 @@ total-perspective-vortex==3.1.3 trio==0.33.0 trio-websocket==0.12.2 tuspy==1.1.0 -twill==3.3.1 twine==6.2.0 types-cachetools==6.2.0.20251022 types-requests==2.32.4.20260107 diff --git a/lib/galaxy/dependencies/pinned-test-requirements.txt b/lib/galaxy/dependencies/pinned-test-requirements.txt index e9d19429d0e..79ce33341c0 100644 --- a/lib/galaxy/dependencies/pinned-test-requirements.txt +++ b/lib/galaxy/dependencies/pinned-test-requirements.txt @@ -162,7 +162,6 @@ total-perspective-vortex==3.1.3 trio==0.33.0 trio-websocket==0.12.2 tuspy==1.1.0 -twill==3.3.1 types-cachetools==6.2.0.20251022 types-requests==2.32.4.20260107 typing-extensions==4.15.0 diff --git a/pyproject.toml b/pyproject.toml index 4d14622589e..816ceaff448 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -152,7 +152,6 @@ test = [ "testfixtures", "total-perspective-vortex>=3.1.1,<4", # https://github.com/galaxyproject/total-perspective-vortex/pull/173 "tuspy", - "twill>=3.2.5", # Python 3.13 support "watchdog", "Werkzeug", ] From 272a5b826a30d76d6211d1be134ace56024318b3 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Sat, 28 Feb 2026 19:44:15 +0000 Subject: [PATCH 5/5] More twill clean-up --- lib/galaxy/tool_util/verify/interactor.py | 3 +-- lib/galaxy/tools/parameters/basic.py | 1 - lib/tool_shed/test/base/README.md | 14 +++++++------- .../test_0420_citable_urls_for_repositories.py | 12 ------------ mypy.ini | 2 -- run_tests.sh | 3 +-- 6 files changed, 9 insertions(+), 26 deletions(-) diff --git a/lib/galaxy/tool_util/verify/interactor.py b/lib/galaxy/tool_util/verify/interactor.py index 1a2f47aaa8f..1bf9d5d6998 100644 --- a/lib/galaxy/tool_util/verify/interactor.py +++ b/lib/galaxy/tool_util/verify/interactor.py @@ -1779,8 +1779,7 @@ def _verify_outputs(testdef, history, jobs, data_list, data_collection_list, gal output_data = data_list[name] except (TypeError, KeyError): # Legacy - fall back on ordered data list access if data_list is - # just a list (case with twill variant or if output changes its - # name). + # just a list (e.g. if output changes its name). try: if hasattr(data_list, "values"): output_data = list(data_list.values())[output_index] diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index e9177edf36a..95ed5ffced8 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1392,7 +1392,6 @@ class ColumnListParameter(SelectToolParameter): those columns that contain numerical values in the associated DataToolParameter. # TODO: we need better testing here, but not sure how to associate a DatatoolParameter with a ColumnListParameter - # from a twill perspective... >>> # Mock up a history (not connected to database) >>> from galaxy.model import History, HistoryDatasetAssociation diff --git a/lib/tool_shed/test/base/README.md b/lib/tool_shed/test/base/README.md index 4a2e1f6ea0b..24c6f61ff9d 100644 --- a/lib/tool_shed/test/base/README.md +++ b/lib/tool_shed/test/base/README.md @@ -6,15 +6,15 @@ Base classes and utilities for Tool Shed functional tests. ``` base/ -├── driver.py # ToolShedTestDriver - embedded server setup -├── testcase.py # ShedTestCase - main test base class +├── driver.py # ToolShedTestDriver - embedded server setup +├── testcase.py # ShedTestCase - main test base class ├── playwrighttestcase.py # PlaywrightTestCase - browser test base ├── playwrightbrowser.py # PlaywrightShedBrowser - browser abstraction -├── browser.py # ShedBrowser protocol -├── populators.py # ToolShedPopulator - API fixture creation -├── api.py # ShedApiTestCase - API test base -├── api_util.py # API interaction utilities -└── test_db_util.py # Direct database access +├── browser.py # ShedBrowser protocol +├── populators.py # ToolShedPopulator - API fixture creation +├── api.py # ShedApiTestCase - API test base +├── api_util.py # API interaction utilities +└── test_db_util.py # Direct database access ``` ## Base Classes diff --git a/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py b/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py index 3b3d3a57f51..5b4faf017ee 100644 --- a/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py +++ b/lib/tool_shed/test/functional/test_0420_citable_urls_for_repositories.py @@ -83,9 +83,6 @@ class TestRepositoryCitableURLs(ShedTestCase): """ test_user_1 = self.test_db_util.get_user(common.test_user_1_email) encoded_user_id = self.security.encode_id(test_user_1.id) - # Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly, - # then directly load the url that the iframe should be loading and check for the expected strings. - # The iframe should point to /repository/browse_repositories?user_id=&operation=repositories_by_user strings_displayed: list[str] = [] strings_displayed_in_iframe = ["user1", "filtering_0420", repository_description] self.load_citable_url( @@ -109,9 +106,6 @@ class TestRepositoryCitableURLs(ShedTestCase): test_user_1 = self.test_db_util.get_user(common.test_user_1_email) encoded_user_id = self.security.encode_id(test_user_1.id) encoded_repository_id = repository.id - # Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly, - # then directly load the url that the iframe should be loading and check for the expected strings. - # The iframe should point to /repository/bview_repository?id= strings_displayed: list[str] = [] strings_displayed_in_iframe = [ "user1", @@ -140,9 +134,6 @@ class TestRepositoryCitableURLs(ShedTestCase): test_user_1 = self.test_db_util.get_user(common.test_user_1_email) encoded_user_id = self.security.encode_id(test_user_1.id) encoded_repository_id = repository.id - # Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly, - # then directly load the url that the iframe should be loading and check for the expected strings. - # The iframe should point to /repository/view_repository?id= strings_displayed: list[str] = [] strings_displayed_in_iframe = [ "user1", @@ -185,9 +176,6 @@ class TestRepositoryCitableURLs(ShedTestCase): """ test_user_1 = self.test_db_util.get_user(common.test_user_1_email) encoded_user_id = self.security.encode_id(test_user_1.id) - # Since twill does not load the contents of an iframe, we need to check that the iframe has been generated correctly, - # then directly load the url that the iframe should be loading and check for the expected strings. - # The iframe should point to /repository/browse_repositories?user_id=&operation=repositories_by_user strings_displayed = ["Repository user1/!!invalid!! is not found"] strings_displayed_in_iframe: list[str] = [] self.load_citable_url( diff --git a/mypy.ini b/mypy.ini index 2cbcd494e3a..fd114af7a3f 100644 --- a/mypy.ini +++ b/mypy.ini @@ -710,8 +710,6 @@ check_untyped_defs = False check_untyped_defs = False [mypy-test.functional.test_toolbox_pytest] check_untyped_defs = False -[mypy-tool_shed.test.base.twilltestcase] -check_untyped_defs = False [mypy-galaxy_test.selenium.test_histories_published] check_untyped_defs = False [mypy-galaxy_test.selenium.test_histories_list] diff --git a/run_tests.sh b/run_tests.sh index 303739c0e75..adeab51b49b 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -46,8 +46,7 @@ The main test types are as follows: quickly test just a component or a few components of Galaxy's backend code. - Selenium: These are full stack tests meant to test the Galaxy UI with real browsers and are located in lib/galaxy_test/selenium. -- ToolShed: These are web tests that use the older Python web testing - framework twill to test ToolShed related functionality. These are +- ToolShed: These are tests that test ToolShed related functionality. These are located in lib/tool_shed/test. Python testing is done via pytest. Specific tests can be selected