Spaces:
Running on Zero
Running on Zero
Daryl Lim Claude Opus 4.8 (1M context) commited on
Commit ·
639e59b
1
Parent(s): dbb3bbf
test: clarify input-buttons test docstring
Browse filesgradio 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>
- 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 (
|
| 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}"
|