gradio/test
Abubakar Abid 4030f28af6
Allows updating the dataset of a gr.Examples (#8745)
* helpers

* add changeset

* changes

* add changeset

* changes

* tweak

* format

* example to docs

* add changeset

* fixes

* add tuple

* add changeset

* print

* format

* clean'

* clean

* format

* format backend

* fix backend tests

* format

* notebooks

* comment

* delete demo

* add changeset

* docstring

* docstring

* changes

* add changeset

* components

* changes

* changes

* format

* add test

* fix python test

* use deep_equal

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-15 09:19:52 -07:00
..
components Allows updating the dataset of a gr.Examples (#8745) 2024-07-15 09:19:52 -07:00
golden
test_files Add Timer component (#8505) 2024-06-28 16:53:44 -07:00
tmp
__init__.py
conftest.py Add Timer component (#8505) 2024-06-28 16:53:44 -07:00
README.md
requirements.in
requirements.txt gr.DateTime component (#8713) 2024-07-10 20:55:45 -07:00
test_analytics.py
test_api_info.py
test_blocks.py Add Timer component (#8505) 2024-06-28 16:53:44 -07:00
test_buttons.py Add event listener support to render blocks (#8243) 2024-05-22 14:51:53 -07:00
test_chat_interface.py Add guides for msg format and llm agents (#8750) 2024-07-12 11:53:28 +00:00
test_components.py Split test/test_components.py into test/components/test_*.py (#8218) 2024-05-07 16:06:34 +09:00
test_custom_component_compatibility.py
test_events.py
test_external.py Allow gr.load to work inside gr.Blocks automatically (#8579) 2024-06-20 12:39:58 -04:00
test_flagging.py
test_gradio_component_cli.py Fix multimodal textbox custom components (#8719) 2024-07-10 13:09:08 +02:00
test_helpers.py Allows updating the dataset of a gr.Examples (#8745) 2024-07-15 09:19:52 -07:00
test_http_server.py
test_interfaces.py Fixes TabbedInterface bug where only first interface events get triggered (#8504) 2024-06-09 08:30:28 -07:00
test_networking.py
test_pipelines.py
test_processing_utils.py Handle GIFs correct in gr.Image preprocessing (#8589) 2024-06-20 23:25:42 +00:00
test_queueing.py Add Timer component (#8505) 2024-06-28 16:53:44 -07:00
test_reload.py
test_routes.py Fix request serialization for fastapi /docs (#8530) 2024-06-11 19:25:50 +00:00
test_theme_sharing.py
test_tunneling.py
test_utils.py Allows updating the dataset of a gr.Examples (#8745) 2024-07-15 09:19:52 -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.