Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /gradio-app_gradio /test /components /test_markdown.py
| import gradio as gr | |
| class TestMarkdown: | |
| def test_component_functions(self): | |
| markdown_component = gr.Markdown("# Let's learn about $x$", label="Markdown") | |
| assert markdown_component.get_config()["value"] == "# Let's learn about $x$" | |
| assert not markdown_component.get_config()["buttons"] | |
| def test_in_interface(self): | |
| """ | |
| Interface, process | |
| """ | |
| iface = gr.Interface(lambda x: x, "text", "markdown") | |
| input_data = " Here's an [image](https://gradio.app/images/gradio_logo.png)" | |
| output_data = iface(input_data) | |
| assert output_data == input_data.strip() | |
| def test_show_copy_button(self): | |
| markdown_component = gr.Markdown("# Let's learn about $x$", buttons=["copy"]) | |
| assert markdown_component.get_config()["buttons"] == ["copy"] | |
| def test_layout_parameters(self): | |
| markdown_component = gr.Markdown( | |
| "# Let's learn about $x$", scale=2, min_width=120 | |
| ) | |
| assert markdown_component.get_config()["scale"] == 2 | |
| assert markdown_component.get_config()["min_width"] == 120 | |
Xet Storage Details
- Size:
- 1.11 kB
- Xet hash:
- 46fa0931a80cecac91637a0e83dc6bb37d5978bd1bb7af81f5e7b26be2482ddb
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.