Skip to content

Commit 1ccf881

Browse files
authored
Merge pull request galaxyproject#20838 from nsoranzo/pytest8
Update pytest to v8
2 parents 248ffcd + 45f2fd9 commit 1ccf881

5 files changed

Lines changed: 28 additions & 17 deletions

File tree

lib/galaxy/dependencies/dev-requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ async-timeout==5.0.1 ; python_full_version < '3.11'
1111
attrs==25.3.0
1212
axe-selenium-python==2.1.6
1313
babel==2.17.0
14+
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
1415
backports-tarfile==1.2.0 ; python_full_version < '3.12' and platform_machine != 'ppc64le' and platform_machine != 's390x'
1516
black==25.9.0
1617
boto3==1.40.18
@@ -126,8 +127,8 @@ pyproject-hooks==1.2.0
126127
pyshacl==0.26.0 ; python_full_version < '3.10'
127128
pyshacl==0.30.1 ; python_full_version >= '3.10'
128129
pysocks==1.7.1
129-
pytest==7.4.4
130-
pytest-asyncio==0.23.8
130+
pytest==8.4.2
131+
pytest-asyncio==1.2.0
131132
pytest-base-url==2.1.0
132133
pytest-cov==7.0.0
133134
pytest-html==4.1.1

lib/galaxy/dependencies/pinned-test-requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ ase==3.26.0
88
async-timeout==5.0.1 ; python_full_version < '3.11'
99
attrs==25.3.0
1010
axe-selenium-python==2.1.6
11+
backports-asyncio-runner==1.2.0 ; python_full_version < '3.11'
1112
boto3==1.40.18
1213
botocore==1.40.18
1314
cachecontrol==0.14.3
@@ -94,8 +95,8 @@ pyparsing==3.2.4
9495
pyshacl==0.26.0 ; python_full_version < '3.10'
9596
pyshacl==0.30.1 ; python_full_version >= '3.10'
9697
pysocks==1.7.1
97-
pytest==7.4.4
98-
pytest-asyncio==0.23.8
98+
pytest==8.4.2
99+
pytest-asyncio==1.2.0
99100
pytest-base-url==2.1.0
100101
pytest-cov==7.0.0
101102
pytest-html==4.1.1

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ test = [
127127
"onedatafilerestclient==21.2.5.2",
128128
"pkce",
129129
"playwright>=1.48.0", # Python 3.13 support
130-
"pytest<8", # https://github.com/galaxyproject/galaxy/issues/17561
130+
"pytest",
131131
"pytest-asyncio",
132132
"pytest-cov",
133133
"pytest-html",

test/integration/objectstore/test_onedata_objectstore.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828

2929

3030
class TestOnedataObjectStoreIntegration(BaseOnedataObjectStoreIntegrationTestCase):
31-
pass
31+
@classmethod
32+
def handle_galaxy_config_kwds(cls, config):
33+
super().handle_galaxy_config_kwds(config)
34+
config["enable_celery_tasks"] = False
3235

3336

3437
instance = integration_util.integration_module_instance(TestOnedataObjectStoreIntegration)

test/integration/oidc/test_auth_oidc.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
import tempfile
88
import time
99
from string import Template
10-
from typing import ClassVar
10+
from typing import (
11+
ClassVar,
12+
Union,
13+
)
1114
from unittest.mock import (
1215
_patch,
1316
patch,
@@ -124,7 +127,7 @@ class BaseKeycloakIntegrationTestCase(integration_util.IntegrationTestCase):
124127
container_name: ClassVar[str]
125128
backend_config_file: ClassVar[str]
126129
provider_name: ClassVar[str]
127-
saved_oauthlib_insecure_transport: ClassVar[bool]
130+
saved_env_vars: ClassVar[dict[str, Union[str, None]]]
128131
config_patcher: ClassVar[_patch]
129132

130133
@classmethod
@@ -174,18 +177,21 @@ def tearDownClass(cls):
174177

175178
@classmethod
176179
def disableOauthlibHttps(cls):
177-
if "OAUTHLIB_INSECURE_TRANSPORT" in os.environ:
178-
cls.saved_oauthlib_insecure_transport = bool(os.environ["OAUTHLIB_INSECURE_TRANSPORT"])
179-
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "true"
180-
os.environ["REQUESTS_CA_BUNDLE"] = os.path.dirname(__file__) + "/keycloak-server.crt.pem"
181-
os.environ["SSL_CERT_FILE"] = os.path.dirname(__file__) + "/keycloak-server.crt.pem"
180+
env_vars = {
181+
"OAUTHLIB_INSECURE_TRANSPORT": "true",
182+
"REQUESTS_CA_BUNDLE": os.path.dirname(__file__) + "/keycloak-server.crt.pem",
183+
"SSL_CERT_FILE": os.path.dirname(__file__) + "/keycloak-server.crt.pem",
184+
}
185+
cls.saved_env_vars = {key: os.environ.get(key) for key in env_vars}
186+
os.environ.update(env_vars)
182187

183188
@classmethod
184189
def restoreOauthlibHttps(cls):
185-
if getattr(cls, "saved_oauthlib_insecure_transport", None):
186-
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = str(cls.saved_oauthlib_insecure_transport)
187-
else:
188-
del os.environ["OAUTHLIB_INSECURE_TRANSPORT"]
190+
for key, value in cls.saved_env_vars.items():
191+
if value is not None:
192+
os.environ[key] = value
193+
else:
194+
del os.environ[key]
189195

190196
@classmethod
191197
def handle_galaxy_oidc_config_kwds(cls, config):

0 commit comments

Comments
 (0)