Daryl Lim Claude Opus 4.8 (1M context) commited on
Commit
639e59b
·
1 Parent(s): dbb3bbf

test: clarify input-buttons test docstring

Browse files

gradio silently accepts invalid button values rather than rejecting
them, so the empty-list assertion is the actual guard. Reword the
docstring so it no longer implies a runtime rejection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. tests/test_app.py +1 -1
tests/test_app.py CHANGED
@@ -154,7 +154,7 @@ def test_input_textbox_has_no_placeholder(demo):
154
 
155
 
156
  def test_input_textbox_has_no_buttons(demo):
157
- """Input textbox should expose no toolbar buttons (invalid 'clear' button removed)."""
158
  textboxes = [b for b in demo.blocks.values() if type(b).__name__ == "Textbox"]
159
  interactive = [t for t in textboxes if t.interactive is not False]
160
  assert interactive[0].buttons == [], f"Expected no buttons, got {interactive[0].buttons!r}"
 
154
 
155
 
156
  def test_input_textbox_has_no_buttons(demo):
157
+ """Input textbox should expose no toolbar buttons (gradio accepts invalid button values silently)."""
158
  textboxes = [b for b in demo.blocks.values() if type(b).__name__ == "Textbox"]
159
  interactive = [t for t in textboxes if t.interactive is not False]
160
  assert interactive[0].buttons == [], f"Expected no buttons, got {interactive[0].buttons!r}"