mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-18 10:44:33 +08:00
Fix flaky external test (#3348)
* Fix flaky external test * CHANGELOG * Undo accidental diff * Fix flaky external test * CHANGELOG * Undo accidental diff * Remove from changelog * Use bunny file --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
04ddce05b3
commit
6242b2700e
@ -54,8 +54,8 @@ By [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3297](https://git
|
||||
- Gradio Status Page by [@aliabd](https://github.com/aliabd) in [PR 3331](https://github.com/gradio-app/gradio/pull/3331)
|
||||
|
||||
## Testing and Infrastructure Changes:
|
||||
* Adds a script to benchmark the performance of the queue and adds some instructions on how to use it. By [@freddyaboulton](https://github.com/freddyaboulton) and [@abidlabs](https://github.com/abidlabs) in [PR 3272](https://github.com/gradio-app/gradio/pull/3272)
|
||||
* Flaky python tests no longer cancel non-flaky tests by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3344](https://github.com/gradio-app/gradio/pull/3344)
|
||||
- Adds a script to benchmark the performance of the queue and adds some instructions on how to use it. By [@freddyaboulton](https://github.com/freddyaboulton) and [@abidlabs](https://github.com/abidlabs) in [PR 3272](https://github.com/gradio-app/gradio/pull/3272)
|
||||
- Flaky python tests no longer cancel non-flaky tests by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3344](https://github.com/gradio-app/gradio/pull/3344)
|
||||
|
||||
## Breaking Changes:
|
||||
No changes to highlight.
|
||||
|
@ -886,11 +886,11 @@ def tex2svg(formula, *args):
|
||||
svg_start = xml_code.index("<svg ")
|
||||
svg_code = xml_code[svg_start:]
|
||||
svg_code = re.sub(r"<metadata>.*<\/metadata>", "", svg_code, flags=re.DOTALL)
|
||||
svg_code = re.sub(r' width="[^"]+"', "", svg_code)
|
||||
svg_code = re.sub(r' width="[^"]+"', '', svg_code)
|
||||
height_match = re.search(r'height="([\d.]+)pt"', svg_code)
|
||||
if height_match:
|
||||
height = float(height_match.group(1))
|
||||
new_height = height / FONTSIZE # conversion from pt to em
|
||||
new_height = height / FONTSIZE # conversion from pt to em
|
||||
svg_code = re.sub(r'height="[\d.]+pt"', f'height="{new_height}em"', svg_code)
|
||||
copy_code = f"<span style='font-size: 0px'>{formula}</span>"
|
||||
return f"{copy_code}{svg_code}"
|
||||
|
@ -329,7 +329,7 @@ class TestLoadInterface:
|
||||
app, _, _ = io.launch(prevent_thread_lock=True)
|
||||
test_client = TestClient(app)
|
||||
r = test_client.get(
|
||||
"/proxy=https://gradio-tests-test-loading-examples-private.hf.space/file=/tmp/tmpdd31pyri/Bunnyp0c5zw__.obj"
|
||||
"/proxy=https://gradio-tests-test-loading-examples-private.hf.space/file=Bunny.obj"
|
||||
)
|
||||
assert r.status_code == 200
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user