gradio/test
Abubakar Abid a1c21cb69a
fix dataset update (#8581)
* fix dataset update

* revert'

* add changeset

* add test

* add changeset

* changes

* add template

* add changeset

* fix docstring

* test postprocessing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-19 23:00:57 +00:00
..
components fix dataset update (#8581) 2024-06-19 23:00:57 +00:00
golden
test_files
tmp
__init__.py
conftest.py Remove deprecated parameters from Python Client (#8444) 2024-06-05 00:26:28 +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 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
test_external.py fix client flaky tests (#8481) 2024-06-06 07:05:28 -07:00
test_flagging.py
test_gradio_component_cli.py
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
test_pipelines.py
test_processing_utils.py Ensure JSON component outputs handled properly in postprocess (#8292) 2024-05-15 21:38:50 +00:00
test_queueing.py
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 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.