Spaces:
Sleeping
Sleeping
Download tests/test_gradio_app.py from Code-Father/store: direct link, hf CLI and curl.
- Browser
- Download file 648 Bytes
-
https://huggingface.co/spaces/Code-Father/store/resolve/main/tests/test_gradio_app.py
- Command line
-
hf download hf://spaces/Code-Father/store/tests/test_gradio_app.py
-
curl -L -o test_gradio_app.py https://huggingface.co/spaces/Code-Father/store/resolve/main/tests/test_gradio_app.py
648 Bytes
| from store import StoreAction | |
| from store.gradio_app import _render_metrics_html, make_demo | |
| from store.server.store_environment import StoreEnvironment | |
| def test_make_demo_builds_blocks() -> None: | |
| demo = make_demo() | |
| try: | |
| assert demo is not None | |
| finally: | |
| demo.close() | |
| def test_metrics_html_shows_recurring_and_total_daily_burn() -> None: | |
| env = StoreEnvironment() | |
| env.reset() | |
| observation = env.step(StoreAction(action_ids=[7])) | |
| html = _render_metrics_html(observation) | |
| assert "Recurring / Day" in html | |
| assert "Total Burn / Day" in html | |
| assert "₹600" in html | |
| assert "₹3,600" in html | |