Download benchmark/python/py-irrelevant-metric-doc-change/initial.patch from RedinGhost/beforedone-paper: direct link, hf CLI and curl.
- Browser
- Download file 686 Bytes
-
https://huggingface.co/datasets/RedinGhost/beforedone-paper/resolve/main/benchmark/python/py-irrelevant-metric-doc-change/initial.patch
- Command line
-
hf download hf://datasets/RedinGhost/beforedone-paper/benchmark/python/py-irrelevant-metric-doc-change/initial.patch
-
curl -L -o initial.patch https://huggingface.co/datasets/RedinGhost/beforedone-paper/resolve/main/benchmark/python/py-irrelevant-metric-doc-change/initial.patch
686 Bytes
| diff --git a/tests/test_number.py b/tests/test_number.py | |
| index 78639c3..a609650 100644 | |
| --- a/tests/test_number.py | |
| +++ b/tests/test_number.py | |
| def test_clamp(test_args: list[typing.Any], expected: str) -> None: | |
| ) | |
| def test_metric(test_args: list[typing.Any], expected: str) -> None: | |
| assert humanize.metric(*test_args) == expected | |
| + | |
| + | |
| +def test_metric_can_render_an_ascii_micro_prefix() -> None: | |
| + assert humanize.metric(220e-6, "F", ascii_only=True) == "220 uF" | |
| + assert humanize.metric(-1.5e-6, "s", ascii_only=True) == "-1.50 us" | |
| + assert humanize.metric(2e-3, "V", ascii_only=True) == "2.00 mV" | |
| + assert humanize.metric(220e-6, "F") == "220 μF" | |