Skip to content

Commit 797fd96

Browse files
committed
remove unsupported behavior
1 parent 7cdc056 commit 797fd96

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

tests/test_config.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -92,34 +92,6 @@ class CustomValueErrorTest(Statica, config=custom_config):
9292
assert "price > 999.99" in str(exc_info.value)
9393

9494

95-
def test_config_override_in_inheritance() -> None:
96-
"""Test that child classes can override parent configuration."""
97-
98-
parent_config = StaticaConfig.create(
99-
type_error_message="Parent: expected {expected_type}, got {found_type}",
100-
)
101-
102-
child_config = StaticaConfig.create(
103-
type_error_message="Child: expected {expected_type}, got {found_type}",
104-
)
105-
106-
class ParentTest(Statica, config=parent_config):
107-
name: str
108-
109-
class ChildTest(ParentTest, config=child_config):
110-
age: int
111-
112-
# Parent uses parent config
113-
with pytest.raises(TypeValidationError) as exc_info:
114-
ParentTest.from_map({"name": 123})
115-
assert "Parent: expected str, got int" in str(exc_info.value)
116-
117-
# Child uses child config (overridden)
118-
with pytest.raises(TypeValidationError) as exc_info:
119-
ChildTest.from_map({"name": "John", "age": "not_int"})
120-
assert "Child: expected int, got str" in str(exc_info.value)
121-
122-
12395
def test_custom_config_with_from_map() -> None:
12496
"""Test that custom configuration works with from_map method."""
12597

0 commit comments

Comments
 (0)