Spaces:
Sleeping
Sleeping
Download tests/test_slide_render_worker.py from Rsan0948/calculus-animator: direct link, hf CLI and curl.
- Browser
- Download file 454 Bytes
-
https://huggingface.co/spaces/Rsan0948/calculus-animator/resolve/main/tests/test_slide_render_worker.py
- Command line
-
hf download hf://spaces/Rsan0948/calculus-animator/tests/test_slide_render_worker.py
-
curl -L -o test_slide_render_worker.py https://huggingface.co/spaces/Rsan0948/calculus-animator/resolve/main/tests/test_slide_render_worker.py
454 Bytes
| from __future__ import annotations | |
| from api import slide_render_worker as worker | |
| def test_pretty_math_text_formats_exponents_and_fractions(): | |
| text = r"\frac{d^5}{dx^5} \left(x^3 \sin(x^2)\right)" | |
| out = worker._pretty_math_text(text) | |
| assert "d" in out | |
| assert "sin" in out | |
| assert "⁵" in out | |
| def test_sup_and_sub_maps_produce_unicode(): | |
| assert worker._to_sup("12x") == "¹²ˣ" | |
| assert worker._to_sub("12x") == "₁₂ₓ" | |