We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50f3d01 commit 138d44aCopy full SHA for 138d44a
1 file changed
tests/test_list_parsing_utils.py
@@ -131,6 +131,22 @@ def test_parse_mapping_list_items_falls_back_when_key_display_returns_non_string
131
)
132
133
134
+def test_parse_mapping_list_items_falls_back_when_key_display_returns_string_subclass():
135
+ class _DisplayString(str):
136
+ pass
137
+
138
+ with pytest.raises(
139
+ HyperbrowserError,
140
+ match="Failed to read demo object value for key '<unreadable key>' at index 0",
141
+ ):
142
+ parse_mapping_list_items(
143
+ [_ExplodingValueMapping()],
144
+ item_label="demo",
145
+ parse_item=lambda payload: payload,
146
+ key_display=lambda key: _DisplayString(key),
147
+ )
148
149
150
def test_parse_mapping_list_items_falls_back_when_key_display_returns_blank_string():
151
with pytest.raises(
152
HyperbrowserError,
0 commit comments