Skip to content

Commit

Permalink
Remove no-longer necessary test-skips
Browse files Browse the repository at this point in the history
These skips were transitionally necessary, but the underlying imports and
expectations are now stabilized.
  • Loading branch information
khk-globus committed Dec 9, 2024
1 parent f65eaa1 commit 55c1887
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 37 deletions.
33 changes: 14 additions & 19 deletions smoke_tests/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,32 +135,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")
Expand Down
9 changes: 1 addition & 8 deletions smoke_tests/tests/test_running_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
import time

import globus_compute_sdk as gc
import pytest
from globus_compute_sdk import 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__)


Expand All @@ -34,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, endpoint):
"""Test batch submission and get_batch_result"""

Expand Down
11 changes: 1 addition & 10 deletions smoke_tests/tests/test_s3_indirect.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 55c1887

Please sign in to comment.