Skip to content

Commit 774b632

Browse files
Test display custom fallback truncation semantics
Co-authored-by: Shri Sukhani <shrisukhani@users.noreply.github.com>
1 parent 10b2b4b commit 774b632

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_display_utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,14 @@ class _StringSubclass(str):
115115
)
116116
== "<blank key>"
117117
)
118+
119+
120+
def test_format_string_key_for_error_truncates_custom_blank_fallback():
121+
assert (
122+
format_string_key_for_error(
123+
" ",
124+
max_length=12,
125+
blank_fallback="fallback-value-too-long",
126+
)
127+
== "... (truncated)"
128+
)

0 commit comments

Comments
 (0)