gradio/test
Abubakar Abid f08da1a6f2
Fixes markdown rendering in examples (#6071)
* Fixes markdown rendering in examples

* add changeset

* update delimiters

* format

* format

* docstrings

* test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-24 12:53:55 -07:00
..
golden updated test images 2022-03-17 10:45:48 -07:00
test_files Format js in v4 branch (#6016) 2023-10-19 13:11:00 -04: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 Removes deprecated arguments and parameters from v4 (#5968) 2023-10-18 16:25:23 -07:00
README.md Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
requirements.in squash commit 2023-10-16 15:16:29 -04:00
requirements.txt Add json schema unit tests (#5970) 2023-10-18 13:53:46 -04:00
test_analytics.py Lite: Fix the analytics module to use asyncio to work in the Wasm env (#5045) 2023-08-04 09:18:14 -04:00
test_api_info.py Add json schema unit tests (#5970) 2023-10-18 13:53:46 -04:00
test_blocks.py Removes deprecated arguments and parameters from v4 (#5968) 2023-10-18 16:25:23 -07:00
test_buttons.py squash commit 2023-10-16 15:16:29 -04:00
test_chat_interface.py squash commit 2023-10-16 15:16:29 -04:00
test_components.py Fixes markdown rendering in examples (#6071) 2023-10-24 12:53:55 -07:00
test_events.py Add gr.on listener method (#5639) 2023-09-25 15:25:16 -07:00
test_external.py squash commit 2023-10-16 15:16:29 -04:00
test_flagging.py Fix dataset features and dataset preview for HuggingFaceDatasetSaver (#5135) 2023-08-09 14:14:12 -04:00
test_gradio_component_cli.py fix cc build (#6079) 2023-10-24 14:48:01 -04:00
test_helpers.py fix test 2023-10-20 14:30:49 -04:00
test_interfaces.py Removes deprecated arguments and parameters from v4 (#5968) 2023-10-18 16:25:23 -07:00
test_mix.py squash commit 2023-10-16 15:16:29 -04:00
test_networking.py Allow passing FastAPI app options (#4282) 2023-05-20 18:10:00 +09:00
test_pipelines.py squash commit 2023-10-16 15:16:29 -04:00
test_processing_utils.py squash commit 2023-10-16 15:16:29 -04:00
test_queueing.py [Refactoring] Convert async functions that don't contain await statements to normal functions (#5677) 2023-09-25 13:58:01 -07:00
test_reload.py squash commit 2023-10-16 15:16:29 -04:00
test_route_utils.py Fix gr.SelectData so that the target attribute is correctly attached, and the filedata is included in the data attribute with gr.Gallery (#5798) 2023-10-05 12:53:52 -07:00
test_routes.py Removes deprecated arguments and parameters from v4 (#5968) 2023-10-18 16:25:23 -07:00
test_theme_sharing.py Amend error toast and pill styling (#4454) 2023-06-15 19:51:09 +02:00
test_tunneling.py Persistent FRP (#3149) 2023-02-16 16:31:16 -06:00
test_utils.py Assert refactor in external.py (#5811) 2023-10-06 18:14:14 -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 resides 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.