From cbcfe1456ad2ea38541a6e2aa21d4abc01d7023c Mon Sep 17 00:00:00 2001 From: Kevin Hunter Kesling Date: Mon, 9 Dec 2024 11:30:14 -0500 Subject: [PATCH] Remove no-longer necessary test-skips These skips were transitionally necessary, but the underlying imports and expectations are now stabilized. --- smoke_tests/tests/conftest.py | 33 +++++++++------------ smoke_tests/tests/test_running_functions.py | 8 +---- smoke_tests/tests/test_s3_indirect.py | 11 +------ 3 files changed, 16 insertions(+), 36 deletions(-) diff --git a/smoke_tests/tests/conftest.py b/smoke_tests/tests/conftest.py index ceb25f9d9..4794d1f6f 100644 --- a/smoke_tests/tests/conftest.py +++ b/smoke_tests/tests/conftest.py @@ -136,32 +136,27 @@ def _add_args_for_client_creds_login(api_client_id, api_client_secret, client_ar funcx_authorizer = AccessTokenAuthorizer(funcx_token) auth_authorizer = AccessTokenAuthorizer(auth_token) - try: - from globus_compute_sdk.sdk.login_manager import LoginManagerProtocol - except ImportError: - client_args["fx_authorizer"] = funcx_authorizer - client_args["openid_authorizer"] = auth_authorizer - else: + from globus_compute_sdk.sdk.login_manager import LoginManagerProtocol - class TestsuiteLoginManager: - def ensure_logged_in(self) -> None: - pass + class TestsuiteLoginManager: + def ensure_logged_in(self) -> None: + pass - def logout(self) -> None: - pass + def logout(self) -> None: + pass - def get_auth_client(self) -> AuthClient: - return AuthClient(authorizer=auth_authorizer) + def get_auth_client(self) -> AuthClient: + return AuthClient(authorizer=auth_authorizer) - def get_web_client(self, *, base_url: str | None = None) -> WebClient: - return WebClient(base_url=base_url, authorizer=funcx_authorizer) + def get_web_client(self, *, base_url: str | None = None) -> WebClient: + return WebClient(base_url=base_url, authorizer=funcx_authorizer) - login_manager = TestsuiteLoginManager() + login_manager = TestsuiteLoginManager() - # check runtime-checkable protocol - assert isinstance(login_manager, LoginManagerProtocol) + # check runtime-checkable protocol + assert isinstance(login_manager, LoginManagerProtocol) - client_args["login_manager"] = login_manager + client_args["login_manager"] = login_manager @pytest.fixture(scope="session") diff --git a/smoke_tests/tests/test_running_functions.py b/smoke_tests/tests/test_running_functions.py index f3650476c..831e40dea 100644 --- a/smoke_tests/tests/test_running_functions.py +++ b/smoke_tests/tests/test_running_functions.py @@ -2,15 +2,10 @@ import typing as t import globus_compute_sdk as gc -import pytest from globus_compute_sdk import Client, Executor +from globus_compute_sdk.errors import TaskPending from packaging.version import Version -try: - from globus_compute_sdk.errors import TaskPending -except ImportError: - from globus_compute_sdk.utils.errors import TaskPending - sdk_version = Version(gc.version.__version__) @@ -33,7 +28,6 @@ def ohai(): return "ohai" -@pytest.mark.skipif(sdk_version.release < (2, 2, 5), reason="batch.add iface updated") def test_batch(compute_client: Client, endpoint: str, linear_backoff: t.Callable): """Test batch submission and get_batch_result""" diff --git a/smoke_tests/tests/test_s3_indirect.py b/smoke_tests/tests/test_s3_indirect.py index 548dcb063..e35d25afd 100644 --- a/smoke_tests/tests/test_s3_indirect.py +++ b/smoke_tests/tests/test_s3_indirect.py @@ -1,11 +1,5 @@ import pytest - -try: - from globus_compute_sdk.errors import TaskExecutionFailed - - has_task_exec_error_type = True -except ImportError: - has_task_exec_error_type = False +from globus_compute_sdk.errors import TaskExecutionFailed def large_result_producer(size: int) -> str: @@ -25,9 +19,6 @@ def test_allowed_result_sizes(submit_function_and_get_result, endpoint, size): assert len(r.result) == size -@pytest.mark.skipif( - not has_task_exec_error_type, reason="Test requires newer execution exception type" -) def test_result_size_too_large(submit_function_and_get_result, endpoint): """ Globus Compute should raise a MaxResultSizeExceeded exception when results exceeds