Skip to content

Commit 29e75b7

Browse files
committed
test: drop v1 output baselines after restack
1 parent 4ad32e4 commit 29e75b7

7 files changed

Lines changed: 0 additions & 214 deletions

tests/data/expected/main/jsonschema/additional_properties_false_pydantic_v1.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/data/expected/main/jsonschema/additional_properties_true_pydantic_v1.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/data/expected/main/jsonschema/unevaluated_properties_pydantic_v1.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/data/expected/main/jsonschema/unevaluated_properties_true_pydantic_v1.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

tests/data/expected/main/jsonschema/use_frozen_field_v1.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

tests/main/jsonschema/test_main_jsonschema.py

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,42 +3383,6 @@ def test_main_jsonschema_unevaluated_properties(output_file: Path) -> None:
33833383
)
33843384

33853385

3386-
def test_main_jsonschema_additional_properties_true_pydantic_v1(output_file: Path) -> None:
3387-
"""Test additionalProperties: true generates extra='allow' for Pydantic v1."""
3388-
run_main_and_assert(
3389-
input_path=JSON_SCHEMA_DATA_PATH / "pydantic_v2_dataclass_additional_props_true.json",
3390-
output_path=output_file,
3391-
input_file_type="jsonschema",
3392-
assert_func=assert_file_content,
3393-
expected_file="additional_properties_true_pydantic_v1.py",
3394-
extra_args=["--output-model-type", "pydantic.BaseModel"],
3395-
)
3396-
3397-
3398-
def test_main_jsonschema_additional_properties_false_pydantic_v1(output_file: Path) -> None:
3399-
"""Test additionalProperties: false generates extra='forbid' for Pydantic v1."""
3400-
run_main_and_assert(
3401-
input_path=JSON_SCHEMA_DATA_PATH / "pydantic_v2_dataclass_config.json",
3402-
output_path=output_file,
3403-
input_file_type="jsonschema",
3404-
assert_func=assert_file_content,
3405-
expected_file="additional_properties_false_pydantic_v1.py",
3406-
extra_args=["--output-model-type", "pydantic.BaseModel"],
3407-
)
3408-
3409-
3410-
def test_main_jsonschema_unevaluated_properties_pydantic_v1(output_file: Path) -> None:
3411-
"""Test unevaluatedProperties: false generates extra='forbid' for Pydantic v1."""
3412-
run_main_and_assert(
3413-
input_path=JSON_SCHEMA_DATA_PATH / "unevaluated_properties.json",
3414-
output_path=output_file,
3415-
input_file_type="jsonschema",
3416-
assert_func=assert_file_content,
3417-
expected_file="unevaluated_properties_pydantic_v1.py",
3418-
extra_args=["--output-model-type", "pydantic.BaseModel"],
3419-
)
3420-
3421-
34223386
def test_main_jsonschema_unevaluated_properties_true(output_file: Path) -> None:
34233387
"""Test unevaluatedProperties: true generates extra='allow'."""
34243388
run_main_and_assert(
@@ -3430,18 +3394,6 @@ def test_main_jsonschema_unevaluated_properties_true(output_file: Path) -> None:
34303394
)
34313395

34323396

3433-
def test_main_jsonschema_unevaluated_properties_true_pydantic_v1(output_file: Path) -> None:
3434-
"""Test unevaluatedProperties: true generates extra='allow' for Pydantic v1."""
3435-
run_main_and_assert(
3436-
input_path=JSON_SCHEMA_DATA_PATH / "unevaluated_properties_true.json",
3437-
output_path=output_file,
3438-
input_file_type="jsonschema",
3439-
assert_func=assert_file_content,
3440-
expected_file="unevaluated_properties_true_pydantic_v1.py",
3441-
extra_args=["--output-model-type", "pydantic.BaseModel"],
3442-
)
3443-
3444-
34453397
def test_main_jsonschema_unevaluated_properties_schema(output_file: Path) -> None:
34463398
"""Test unevaluatedProperties as JsonSchemaObject triggers traversal."""
34473399
run_main_and_assert(
@@ -5171,21 +5123,6 @@ def test_main_json_pointer_percent_encoded_segments(tmp_path: Path) -> None:
51715123
@pytest.mark.parametrize(
51725124
("extra_fields", "output_model", "expected_output"),
51735125
[
5174-
(
5175-
"allow",
5176-
"pydantic.BaseModel",
5177-
"extra_fields_allow.py",
5178-
),
5179-
(
5180-
"forbid",
5181-
"pydantic.BaseModel",
5182-
"extra_fields_forbid.py",
5183-
),
5184-
(
5185-
"ignore",
5186-
"pydantic.BaseModel",
5187-
"extra_fields_ignore.py",
5188-
),
51895126
(
51905127
"allow",
51915128
"pydantic_v2.BaseModel",
@@ -6545,7 +6482,6 @@ def test_main_bundled_schema_with_id_url(mocker: MockerFixture, output_file: Pat
65456482
@pytest.mark.parametrize(
65466483
("output_model", "expected_file"),
65476484
[
6548-
("pydantic.BaseModel", "use_frozen_field_v1.py"),
65496485
("pydantic_v2.BaseModel", "use_frozen_field_v2.py"),
65506486
("dataclasses.dataclass", "use_frozen_field_dataclass.py"),
65516487
],

tests/main/openapi/test_main_openapi.py

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -542,24 +542,6 @@ def test_main_openapi_extra_template_data_config(
542542
)
543543

544544

545-
def test_main_openapi_extra_template_data_config_pydantic_v1(output_file: Path) -> None:
546-
"""Test extra template data config generation for Pydantic v1."""
547-
with freeze_time(TIMESTAMP):
548-
run_main_and_assert(
549-
input_path=OPEN_API_DATA_PATH / "api.yaml",
550-
output_path=output_file,
551-
input_file_type=None,
552-
assert_func=assert_file_content,
553-
expected_file="extra_template_data_config.py",
554-
extra_args=[
555-
"--extra-template-data",
556-
str(OPEN_API_DATA_PATH / "extra_data.json"),
557-
"--output-model-type",
558-
"pydantic.BaseModel",
559-
],
560-
)
561-
562-
563545
def test_main_custom_template_dir_old_style(
564546
capsys: pytest.CaptureFixture, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
565547
) -> None:
@@ -1148,18 +1130,6 @@ def test_allow_extra_fields(output_file: Path) -> None:
11481130
)
11491131

11501132

1151-
def test_allow_extra_fields_pydantic_v1(output_file: Path) -> None:
1152-
"""Test allow extra fields generation for Pydantic v1."""
1153-
run_main_and_assert(
1154-
input_path=OPEN_API_DATA_PATH / "api.yaml",
1155-
output_path=output_file,
1156-
input_file_type=None,
1157-
assert_func=assert_file_content,
1158-
expected_file="allow_extra_fields.py",
1159-
extra_args=["--allow-extra-fields", "--output-model-type", "pydantic.BaseModel"],
1160-
)
1161-
1162-
11631133
@pytest.mark.skipif(
11641134
black.__version__.split(".")[0] == "19",
11651135
reason="Installed black doesn't support the old style",
@@ -1190,18 +1160,6 @@ def test_enable_faux_immutability(output_file: Path) -> None:
11901160
)
11911161

11921162

1193-
def test_enable_faux_immutability_pydantic_v1(output_file: Path) -> None:
1194-
"""Test faux immutability generation for Pydantic v1."""
1195-
run_main_and_assert(
1196-
input_path=OPEN_API_DATA_PATH / "api.yaml",
1197-
output_path=output_file,
1198-
input_file_type=None,
1199-
assert_func=assert_file_content,
1200-
expected_file="enable_faux_immutability.py",
1201-
extra_args=["--enable-faux-immutability", "--output-model-type", "pydantic.BaseModel"],
1202-
)
1203-
1204-
12051163
@pytest.mark.benchmark
12061164
def test_use_default(output_file: Path) -> None:
12071165
"""Test OpenAPI generation with use default option."""
@@ -1984,23 +1942,6 @@ def test_main_use_annotated_with_field_constraints(min_version: str, output_file
19841942
)
19851943

19861944

1987-
def test_main_use_annotated_with_field_constraints_pydantic_v1(output_file: Path) -> None:
1988-
"""Test Annotated field constraints generation for Pydantic v1."""
1989-
run_main_and_assert(
1990-
input_path=OPEN_API_DATA_PATH / "api_constrained.yaml",
1991-
output_path=output_file,
1992-
input_file_type=None,
1993-
assert_func=assert_file_content,
1994-
expected_file="use_annotated_with_field_constraints.py",
1995-
extra_args=[
1996-
"--field-constraints",
1997-
"--use-annotated",
1998-
"--output-model-type",
1999-
"pydantic.BaseModel",
2000-
],
2001-
)
2002-
2003-
20041945
def test_main_nested_enum(output_file: Path) -> None:
20051946
"""Test OpenAPI generation with nested enum."""
20061947
run_main_and_assert(
@@ -2204,18 +2145,6 @@ def test_main_openapi_const_field(output_model: str, expected_output: str, outpu
22042145
)
22052146

22062147

2207-
def test_main_openapi_const_field_pydantic_v1(output_file: Path) -> None:
2208-
"""Test collapsed const field generation for Pydantic v1."""
2209-
run_main_and_assert(
2210-
input_path=OPEN_API_DATA_PATH / "const.yaml",
2211-
output_path=output_file,
2212-
input_file_type="openapi",
2213-
assert_func=assert_file_content,
2214-
expected_file="const_field.py",
2215-
extra_args=["--output-model-type", "pydantic.BaseModel", "--collapse-root-models"],
2216-
)
2217-
2218-
22192148
def test_main_openapi_complex_reference(output_file: Path) -> None:
22202149
"""Test OpenAPI generation with complex references."""
22212150
run_main_and_assert(

0 commit comments

Comments
 (0)