Skip to content

Commit a6c2a30

Browse files
chore: remove useless test case
1 parent 00b5346 commit a6c2a30

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

tests/validators/test_model.py

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22
from copy import deepcopy
33
from decimal import Decimal
4-
from typing import Any, Callable, Dict, Iterable, List, Set, Tuple
4+
from typing import Any, Callable, Dict, List, Set, Tuple
55

66
import pytest
77
from dirty_equals import HasRepr, IsInstance
@@ -1379,34 +1379,3 @@ class MyModel:
13791379
v.validate_assignment(m, 'enum_field_3', IntWrappable(3))
13801380
v.validate_assignment(m, 'enum_field_4', Decimal(4))
13811381
v.validate_assignment(m, 'enum_field_4', IntWrappable(4))
1382-
1383-
1384-
def test_model_bug():
1385-
class MyModel:
1386-
__slots__ = (
1387-
'__dict__',
1388-
'__pydantic_fields_set__',
1389-
'__pydantic_extra__',
1390-
'__pydantic_private__',
1391-
)
1392-
x: Iterable[int]
1393-
1394-
# WHEN
1395-
v = SchemaValidator(
1396-
core_schema.model_schema(
1397-
MyModel,
1398-
core_schema.model_fields_schema(
1399-
{
1400-
'x': core_schema.model_field(core_schema.generator_schema()),
1401-
},
1402-
),
1403-
)
1404-
)
1405-
print(v)
1406-
1407-
# THEN
1408-
# v.validate_json('{"x": [1, 2, 3]}')
1409-
m = v.validate_python({'x': [1, 2, 3]})
1410-
print(m)
1411-
print(m.x)
1412-
print(type(m.x))

0 commit comments

Comments
 (0)