mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-25 12:10:31 +08:00
parent
df98c443f7
commit
dc37ddb739
@ -2,7 +2,7 @@
|
||||
|
||||
cd "$(dirname ${0})/.."
|
||||
|
||||
echo "Formatting the backend... Our style follows the Black code style."
|
||||
echo "Formatting the client library.. Our style follows the Black code style."
|
||||
python -m black test gradio_client
|
||||
python -m isort --profile=black test gradio_client
|
||||
python -m flake8 --ignore=E731,E501,E722,W503,E126,E203,F403 test gradio_client --exclude gradio_client/__init__.py
|
||||
|
@ -3,6 +3,8 @@
|
||||
cd "$(dirname ${0})/.."
|
||||
|
||||
echo "Formatting the backend... Our style follows the Black code style."
|
||||
python -m black gradio test client/python/gradio_client
|
||||
python -m isort --profile=black gradio test client/python/gradio_client
|
||||
python -m flake8 --ignore=E731,E501,E722,W503,E126,E203,F403 gradio test client/python/gradio_client --exclude gradio/__init__.py,client/python/gradio_client/__init__.py
|
||||
python -m black gradio test
|
||||
python -m isort --profile=black gradio test
|
||||
python -m flake8 --ignore=E731,E501,E722,W503,E126,E203,F403 gradio test --exclude gradio/__init__.py
|
||||
|
||||
bash client/python/scripts/format.sh # Call the client library's formatting script
|
||||
|
@ -21,11 +21,11 @@ import websockets
|
||||
from fastapi.testclient import TestClient
|
||||
|
||||
import gradio as gr
|
||||
from gradio.events import SelectData
|
||||
from gradio.exceptions import DuplicateBlockError
|
||||
from gradio.networking import Server, get_first_available_port
|
||||
from gradio.test_data.blocks_configs import XRAY_CONFIG
|
||||
from gradio.utils import assert_configs_are_equivalent_besides_ids
|
||||
from gradio.events import SelectData
|
||||
|
||||
pytest_plugins = ("pytest_asyncio",)
|
||||
|
||||
@ -1468,9 +1468,7 @@ class TestAddRequests:
|
||||
|
||||
inputs = [1, 2]
|
||||
request = gr.Request()
|
||||
inputs_ = gr.helpers.special_args(
|
||||
moo, copy.deepcopy(inputs), request
|
||||
)[0]
|
||||
inputs_ = gr.helpers.special_args(moo, copy.deepcopy(inputs), request)[0]
|
||||
assert inputs_ == inputs + [request, 42]
|
||||
|
||||
def moo(a, b, req: gr.Request, c=42, pr=pr):
|
||||
|
Loading…
x
Reference in New Issue
Block a user