gradio/test
Abubakar Abid ea2367ccb1
allow setting initial value of gr.Dropdown to None to designate that no value should be initially selected (#9699)
* set initial

* add changeset

* fixes

* revert'

* add changeset

* add test

* fix multiselect case, add test

* change

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-10-15 00:05:45 -07:00
..
components allow setting initial value of gr.Dropdown to None to designate that no value should be initially selected (#9699) 2024-10-15 00:05:45 -07:00
golden
test_files
tmp
__init__.py
conftest.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
README.md
requirements.in Fix flaky tests and tests on Windows (#9059) 2024-08-08 01:41:16 -07:00
requirements.txt 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_analytics.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_api_info.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_blocks.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_buttons.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_chat_interface.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_components.py Adding maxlength attribute handling of textarea and input HTML element for the gr.TextBox() component via a max_length parameter (#9185) 2024-08-27 23:42:05 +00:00
test_custom_component_compatibility.py
test_events.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_external.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_flagging.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_gradio_component_cli.py
test_helpers.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_http_server.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_interfaces.py Fix show_progress in gr.Interface (#9053) 2024-08-07 10:12:04 -07:00
test_networking.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_pipelines.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_processing_utils.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_queueing.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_reload.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_routes.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00
test_theme_sharing.py
test_tunneling.py
test_utils.py 5.0 dev -> main (#8843) 2024-10-08 22:17:17 -07:00

Backend Testing Guidelines

  • All the tests should test Backend functionalities. Frontend functionalities and e2e tests are done in Frontend.
  • Make use of pytest fixtures whenever it is possible. With fixtures, objects with high initialize durations are reused within tests, ex. a client session.
  • All testdata resides within _gradio/test_data and all test_files reside within test/test_files.
  • When doing network operations do not forget to make use of async to make tests faster.
  • Have clear class and function naming within the tests.
  • Short descriptions within test functions are great.
  • Library function docstrings is expected to contain an example, please add missing docstrings to the library while you are writing tests the related function.
  • Library docstring examples and descriptions are expected to align with tests, please fix divergent tests and library docstrings.