Skip to content

Commit bb15d20

Browse files
committed
Remove pytest-subtests, upgrade lockfile
pytest-subtests merged into pytest core as of pytest 9. Update test imports from pytest_subtests.SubTests to _pytest.subtests.Subtests. uv.lock was fully re-resolved, upgrading all transitive dependencies to current versions. Notable: pytest 8.4→9.0, mypy 1.18→1.19, pdoc 15→16, ruff 0.14.0→0.14.14.
1 parent ff21c51 commit bb15d20

4 files changed

Lines changed: 497 additions & 431 deletions

File tree

packages/overture-schema-core/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ packages = ["src/overture"]
3333
[dependency-groups]
3434
dev = [
3535
"jsonpath-ng>=1.7.0",
36-
"pytest-subtests>=0.14.2",
3736
"types-pyyaml>=6.0.12.20250516",
3837
"types-shapely>=2.1.0.20250710",
3938
]

packages/overture-schema-system/tests/primitive/test_geom.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from typing import Annotated, Any
66

77
import pytest
8+
from _pytest.subtests import Subtests
89
from pydantic import BaseModel, ValidationError
9-
from pytest_subtests import SubTests
1010
from shapely import wkt
1111

1212
from overture.schema.system.primitive import (
@@ -275,7 +275,7 @@ def powerset(
275275

276276
@pytest.mark.parametrize("geometry_type_case_subset", TEST_GEOMETRY_TYPE_CASE_SUBSETS)
277277
def test_geometry_type_constraint_on_allowed_geometry(
278-
geometry_type_case_subset: tuple[GeometryTypeCase, ...], subtests: SubTests
278+
geometry_type_case_subset: tuple[GeometryTypeCase, ...], subtests: Subtests
279279
) -> None:
280280
allowed_types = tuple(g.geometry_type for g in geometry_type_case_subset)
281281

@@ -291,7 +291,7 @@ class ConstrainedModel(BaseModel):
291291

292292
@pytest.mark.parametrize("geometry_type_case_subset", TEST_GEOMETRY_TYPE_CASE_SUBSETS)
293293
def test_geometry_type_constraint_on_disallowed_geometry(
294-
geometry_type_case_subset: tuple[GeometryTypeCase, ...], subtests: SubTests
294+
geometry_type_case_subset: tuple[GeometryTypeCase, ...], subtests: Subtests
295295
) -> None:
296296
allowed_types = tuple(g.geometry_type for g in geometry_type_case_subset)
297297

@@ -313,7 +313,7 @@ class ConstrainedModel(BaseModel):
313313

314314
@pytest.mark.parametrize("geometry_type_case_subset", TEST_GEOMETRY_TYPE_CASE_SUBSETS)
315315
def test_geometry_type_constraint_on_geometry_counterexamples(
316-
geometry_type_case_subset: tuple[GeometryTypeCase, ...], subtests: SubTests
316+
geometry_type_case_subset: tuple[GeometryTypeCase, ...], subtests: Subtests
317317
) -> None:
318318
allowed_types = tuple(g.geometry_type for g in geometry_type_case_subset)
319319

packages/overture-schema-system/tests/test_feature.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Annotated, Any, Literal, cast
66

77
import pytest
8+
from _pytest.subtests import Subtests
89
from pydantic import (
910
BaseModel,
1011
ConfigDict,
@@ -15,7 +16,6 @@
1516
create_model,
1617
)
1718
from pydantic.json_schema import JsonSchemaValue, JsonValue
18-
from pytest_subtests import SubTests
1919
from util import assert_subset
2020

2121
from overture.schema.system.feature import Feature, _FieldLevel, _maybe_refactor_schema
@@ -37,7 +37,7 @@
3737

3838
class TestFieldDiscriminator:
3939
@pytest.mark.parametrize("field", ["hello", "type", "properties"])
40-
def test_validation_success_simple(self, field: str, subtests: SubTests) -> None:
40+
def test_validation_success_simple(self, field: str, subtests: Subtests) -> None:
4141
"""
4242
Test the discriminated union success case for a discriminator that is a simple string.
4343
@@ -150,7 +150,7 @@ def test_validation_success_simple(self, field: str, subtests: SubTests) -> None
150150
actual = tap.validate_python(expect)
151151
assert expect == actual
152152

153-
def test_validation_success_convert(self, subtests: SubTests) -> None:
153+
def test_validation_success_convert(self, subtests: Subtests) -> None:
154154
"""
155155
Test the discriminated union success case where the discriminator value is of a variety of
156156
types.
@@ -226,7 +226,7 @@ class TestEnum(str, Enum):
226226
model1_actual = tap.validate_python(model1_expect)
227227
assert model1_expect == model1_actual
228228

229-
def test_validation_success_missing_discriminator(self, subtests: SubTests) -> None:
229+
def test_validation_success_missing_discriminator(self, subtests: Subtests) -> None:
230230
"""
231231
Tests a union of discriminated unions against an input that doesn't contain the
232232
contain the discriminator field of the first union, but does contain the discriminator field

0 commit comments

Comments
 (0)