gradio/test
Hannah bc2cdc1df9
Allow download button for interactive Audio and Video components (#7104)
* allow download button for interactive audio and video components

* add changeset

* document show_download_button in video.py

* ensure show_download_button is by default true for output and false for input components

* fix component test

* tweak default val

* val tweak

* fix test and add story

* pass editable param where needed

* fix another test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Dawood Khan <dawoodkhan82@gmail.com>
2024-01-23 11:33:59 +01:00
..
golden
test_files
tmp
__init__.py
conftest.py
README.md fixed typo (#6896) 2023-12-29 08:17:57 -08:00
requirements.in
requirements.txt Fix flaky CI tests (again 😓 ) (#6780) 2023-12-14 12:40:36 -08:00
test_analytics.py
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 add autodocs (#7030) 2024-01-18 20:47:01 +00:00
test_buttons.py
test_chat_interface.py Fixes issue 5781: Enables specifying a caching directory for Examples (#6803) 2023-12-18 17:07:38 -08:00
test_components.py Allow download button for interactive Audio and Video components (#7104) 2024-01-23 11:33:59 +01:00
test_custom_component_compatibility.py
test_events.py
test_external.py Fixes issue 5781: Enables specifying a caching directory for Examples (#6803) 2023-12-18 17:07:38 -08:00
test_flagging.py
test_gradio_component_cli.py add autodocs (#7030) 2024-01-18 20:47:01 +00:00
test_helpers.py Refactor examples so they accept data in the same format as is returned by function, rename .as_example() to .process_example() (#6933) 2024-01-10 16:35:25 -08:00
test_interfaces.py Add additional_inputs, additional_inputs_accordion parameters to gr.Interface (#6945) 2024-01-10 11:44:00 -08:00
test_networking.py
test_pipelines.py
test_processing_utils.py
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
test_routes.py Component Server fix (#6884) 2023-12-27 14:16:56 -08:00
test_theme_sharing.py
test_tunneling.py
test_utils.py Prevent file traversals (#6833) 2023-12-18 14:30:22 -08: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.