Fix tests

This commit is contained in:
Sylwia Budzynska
2024-05-10 12:41:47 +02:00
parent 52ceb7fb89
commit d6acea1d0c
4 changed files with 9 additions and 12 deletions

View File

@@ -36,8 +36,8 @@ module Gradio {
"upload", "release", "select", "stream", "like", "load", "key_up",
])
.getACall()
or this = API::moduleImport("gradio").getMember(["Interface", "ChatInterface"]).getACall()
or
this = API::moduleImport("gradio").getMember(["Interface", "ChatInterface"]).getACall()
}
}

View File

@@ -1,5 +1,2 @@
| source_test.py:15:15:15:18 | ControlFlowNode for name |
| source_test.py:19:16:19:19 | ControlFlowNode for name |
| source_test.py:26:16:26:19 | ControlFlowNode for name |
| taint_step_test.py:5:12:5:35 | ControlFlowNode for Attribute() |
| taint_step_test.py:6:12:6:35 | ControlFlowNode for Attribute() |
testFailures
failures

View File

@@ -12,18 +12,18 @@ with gr.Blocks() as demo:
# decorator
@greet_btn.click(inputs=name, outputs=output)
def greet(name):
def greet(name): # $ source=name
return "Hello " + name + "!"
# `click` event handler with keyword arguments
def greet1(name):
def greet1(name): # $ source=name
return "Hello " + name + "!"
greet1_btn = gr.Button("Hello")
greet1_btn.click(fn=greet1, inputs=name, outputs=output, api_name="greet")
# `click` event handler with positional arguments
def greet2(name):
def greet2(name): # $ source=name
return "Hello " + name + "!"
greet2_btn = gr.Button("Hello")

View File

@@ -2,8 +2,8 @@ import gradio as gr
import os
with gr.Blocks() as demo:
path = gr.Textbox(label="Path")
file = gr.Textbox(label="File")
path = gr.Textbox(label="Path") # $ source=gr.Textbox(..)
file = gr.Textbox(label="File") # $ source=gr.Textbox(..)
output = gr.Textbox(label="Output Box")