@@ -92,34 +92,6 @@ class CustomValueErrorTest(Statica, config=custom_config):
92
92
assert "price > 999.99" in str (exc_info .value )
93
93
94
94
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
-
123
95
def test_custom_config_with_from_map () -> None :
124
96
"""Test that custom configuration works with from_map method."""
125
97
0 commit comments