mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-23 11:39:17 +08:00
* chagnes * frontend_fix * changes * changes * changes * changes * changes * fixed typing Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
26 lines
693 B
Python
26 lines
693 B
Python
import sys
|
|
import unittest
|
|
|
|
import pytest
|
|
|
|
import gradio as gr
|
|
|
|
|
|
class TestDocumentation(unittest.TestCase):
|
|
@pytest.mark.skipif(
|
|
sys.version_info < (3, 8),
|
|
reason="Docs use features in inspect module not available in py 3.7",
|
|
)
|
|
def test_website_documentation(self):
|
|
documentation = gr.documentation.generate_documentation()
|
|
assert len(documentation) > 0
|
|
|
|
def test_component_api_documentation(self):
|
|
for cls in gr.components.IOComponent.__subclasses__():
|
|
gr.documentation.document_component_api(cls, "input")
|
|
gr.documentation.document_component_api(cls, "output")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|