gradio/test
Abubakar Abid 05fe4918c0
Allow Spaces with .success() to be gr.load-ed (#8242)
* fix success in gr.load

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-08 19:34:23 -05:00
..
components Split test/test_components.py into test/components/test_*.py (#8218) 2024-05-07 16:06:34 +09:00
golden
test_files
tmp
__init__.py
conftest.py Support custom components in gr.load (#8200) 2024-05-02 23:07:45 +00:00
README.md
requirements.in
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
test_blocks.py Allow Spaces with .success() to be gr.load-ed (#8242) 2024-05-08 19:34:23 -05:00
test_buttons.py Store configs per session in the backend (#8030) 2024-04-22 11:20:05 -07:00
test_chat_interface.py Store configs per session in the backend (#8030) 2024-04-22 11:20:05 -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
test_external.py Support custom components in gr.load (#8200) 2024-05-02 23:07:45 +00:00
test_flagging.py
test_gradio_component_cli.py
test_helpers.py ensure ImageEditor events work as expected (#7845) 2024-04-15 20:16:07 +00:00
test_http_server.py Respect auth_dependency parameter in launch() (#8097) 2024-04-23 14:26:19 -07:00
test_interfaces.py
test_networking.py
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 ensure ImageEditor events work as expected (#7845) 2024-04-15 20:16:07 +00:00
test_queueing.py
test_reload.py
test_routes.py Respect auth_dependency parameter in launch() (#8097) 2024-04-23 14:26:19 -07:00
test_theme_sharing.py
test_tunneling.py
test_utils.py Add max_file_size parameter to launch() that limits the size of files that can be uploaded in the Gradio app (#7909) 2024-04-19 15:38:53 -04: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.