Spaces:
Build error
Build error
Download tests/test_telemetry.py from Varun2007/pageparse.ai: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/spaces/Varun2007/pageparse.ai/resolve/main/tests/test_telemetry.py
- Command line
-
hf download hf://spaces/Varun2007/pageparse.ai/tests/test_telemetry.py
-
curl -L -o test_telemetry.py https://huggingface.co/spaces/Varun2007/pageparse.ai/resolve/main/tests/test_telemetry.py
557 Bytes
| # SPDX-FileCopyrightText: 2026 Team Centurions | |
| # SPDX-License-Identifier: AGPL-3.0-or-later | |
| from pageparse.telemetry import get_cpu_percent, get_memory_info, get_telemetry | |
| def test_get_cpu_percent(): | |
| val = get_cpu_percent() | |
| assert 0.0 <= val <= 100.0 | |
| def test_get_memory_info(): | |
| info = get_memory_info() | |
| assert "total_gb" in info | |
| assert "used_gb" in info | |
| assert "percent" in info | |
| assert 0 <= info["percent"] <= 100 | |
| def test_get_telemetry(): | |
| t = get_telemetry() | |
| assert "cpu_percent" in t | |
| assert "total_gb" in t | |