mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
use cdn static files for unit tests
This commit is contained in:
parent
f7820e8ac3
commit
58da83db79
@ -130,7 +130,7 @@ def main():
|
||||
|
||||
@app.route("/static/<path:path>", methods=["GET"])
|
||||
def static_resource(path):
|
||||
if app.interface.share:
|
||||
if app.interface.share or os.getenv("GRADIO_TEST_MODE"):
|
||||
return redirect(GRADIO_STATIC_ROOT + path)
|
||||
else:
|
||||
return send_file(os.path.join(STATIC_PATH_LIB, path))
|
||||
|
@ -11,6 +11,7 @@ import random
|
||||
import os
|
||||
|
||||
current_dir = os.getcwd()
|
||||
os.environ["GRADIO_TEST_MODE"] = "1"
|
||||
|
||||
LOCAL_HOST = "http://localhost:{}"
|
||||
GOLDEN_PATH = "test/golden/{}/{}.png"
|
||||
|
Loading…
Reference in New Issue
Block a user