Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /HKUDS_LightRAG /tests /test_parse_optional_float.py
| """Regression tests for :func:`lightrag.utils.parse_optional_float`.""" | |
| from __future__ import annotations | |
| import pytest | |
| from lightrag.utils import parse_optional_float | |
| pytestmark = pytest.mark.offline | |
| def test_parse_optional_float_rejects_nonfinite(raw: str): | |
| with pytest.raises(ValueError, match="finite"): | |
| parse_optional_float(raw) | |
| def test_parse_optional_float_accepts_finite_and_unset(): | |
| assert parse_optional_float("1.5") == 1.5 | |
| assert parse_optional_float(None) is None | |
| assert parse_optional_float("") is None | |
| assert parse_optional_float("None") is None | |
Xet Storage Details
- Size:
- 668 Bytes
- Xet hash:
- 913890bed108ac49049994e47d0a2af1fa2074ef56a8b77a757b7bb30c8ae023
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.