gradio/test
Abubakar Abid 34430b934d
Handle GIFs correct in gr.Image preprocessing (#8589)
* handle gifs correct in image preprocessing

* add changeset

* fix

* add test

* add test

* docstring

* add docs

* image

* revert

* change

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-20 23:25:42 +00:00
..
components Improved plot rendering (#8580) 2024-06-20 23:09:04 +00:00
golden updated test images 2022-03-17 10:45:48 -07:00
test_files Rotate Images to Upright Position in preprocess (#6676) 2023-12-07 13:16:48 -05:00
tmp End-to-end UI tests with Selenium (#72) 2020-10-23 18:28:30 +04:00
__init__.py blocks-components-tests 2022-03-30 13:08:34 +03:00
conftest.py Remove deprecated parameters from Python Client (#8444) 2024-06-05 00:26:28 +00:00
README.md fixed typo (#6896) 2023-12-29 08:17:57 -08:00
requirements.in Add support for diffuser pipelines in gr.Interface.from_pipeline(). (#7265) 2024-03-08 11:53:38 -08:00
requirements.txt upgrade ruff test dependency to ruff==0.4.1 (#8100) 2024-04-23 09:16:58 -07:00
test_analytics.py Refactor analytics to not use api.gradio.app (#8180) 2024-05-02 20:29:19 -04:00
test_api_info.py Add show_api parameter to events, and fix gr.load(). Also makes some minor improvements to the "view API" page when running on Spaces (#6846) 2023-12-22 11:59:02 -08:00
test_blocks.py fix dataset update (#8581) 2024-06-19 23:00:57 +00: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 event listener support to render blocks (#8243) 2024-05-22 14:51:53 -07: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 upgrade ruff test dependency to ruff==0.4.1 (#8100) 2024-04-23 09:16:58 -07:00
test_events.py Add concurrency_limit to ChatInterface, add IDE support for concurrency_limit (#6653) 2023-12-04 17:19:53 -05:00
test_external.py Allow gr.load to work inside gr.Blocks automatically (#8579) 2024-06-20 12:39:58 -04:00
test_flagging.py Fix flagged files and ensure that flagging_mode="auto" saves output components as well (#7704) 2024-03-14 14:03:34 -07:00
test_gradio_component_cli.py Add --python-path, --pip-path, --gradio-path CLI arguments to let custom component developers control which executable is used (#7638) 2024-03-08 15:01:49 -08:00
test_helpers.py Ensure JSON component outputs handled properly in postprocess (#8292) 2024-05-15 21:38:50 +00:00
test_http_server.py Respect auth_dependency parameter in launch() (#8097) 2024-04-23 14:26:19 -07:00
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 Remove Ruff and Uvicorn in Wasm env (#7744) 2024-03-22 17:32:59 +09:00
test_pipelines.py [HF OAuth] Logout user if oauth token has expired (#8093) 2024-04-22 08:18:04 -07:00
test_processing_utils.py Handle GIFs correct in gr.Image preprocessing (#8589) 2024-06-20 23:25:42 +00:00
test_queueing.py Python client properly handles hearbeat and log messages. Also handles responses longer than 65k (#6693) 2023-12-13 17:47:06 -05:00
test_reload.py Remove Ruff and Uvicorn in Wasm env (#7744) 2024-03-22 17:32:59 +09:00
test_routes.py Fix request serialization for fastapi /docs (#8530) 2024-06-11 19:25:50 +00: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 Version 4 development branch (#5498) 2023-10-31 04:46:02 +00:00
test_utils.py Handle special arguments when extracting parameter names for view API page (#8400) 2024-06-04 08:12:10 -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.