gradio/test
Abubakar Abid 8b33393586
Fix show_progress in gr.Interface (#9053)
* fix progress

* test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-07 10:12:04 -07:00
..
components Amend show_label in gr.HTML to show optional label (#9024) 2024-08-07 09:19:56 -07:00
golden
test_files Add Timer component (#8505) 2024-06-28 16:53:44 -07:00
tmp
__init__.py
conftest.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
README.md
requirements.in Add support for diffuser pipelines in gr.Interface.from_pipeline(). (#7265) 2024-03-08 11:53:38 -08:00
requirements.txt Some tweaks to is_in_or_equal (#9020) 2024-08-06 18:53:10 -04:00
test_analytics.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_api_info.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_blocks.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -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 Fix lazy caching (#8933) 2024-07-30 16:14:15 -07:00
test_components.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_custom_component_compatibility.py upgrade ruff test dependency to ruff==0.4.1 (#8100) 2024-04-23 09:16:58 -07:00
test_events.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_external.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_flagging.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_gradio_component_cli.py Fix multimodal textbox custom components (#8719) 2024-07-10 13:09:08 +02:00
test_helpers.py Fix lazy caching (#8933) 2024-07-30 16:14:15 -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 Remove Ruff and Uvicorn in Wasm env (#7744) 2024-03-22 17:32:59 +09:00
test_pipelines.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_processing_utils.py Extend pyright to cover tests as well (#8856) 2024-07-21 19:55:18 -07:00
test_queueing.py Add Timer component (#8505) 2024-06-28 16:53:44 -07:00
test_reload.py Remove Ruff and Uvicorn in Wasm env (#7744) 2024-03-22 17:32:59 +09:00
test_routes.py Minor fixes (#9021) 2024-08-07 09:20:51 -07:00
test_theme_sharing.py Allow mounted Gradio apps to work with external / arbitrary authentication providers (#7557) 2024-03-05 12:41:39 -08:00
test_tunneling.py
test_utils.py Passes gr.Request if type hint is Request | None (#9011) 2024-08-07 08:33:22 -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.