Download benchmark/python/py-pilot-intword-boundary/initial.patch from RedinGhost/beforedone-paper: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/datasets/RedinGhost/beforedone-paper/resolve/main/benchmark/python/py-pilot-intword-boundary/initial.patch
- Command line
-
hf download hf://datasets/RedinGhost/beforedone-paper/benchmark/python/py-pilot-intword-boundary/initial.patch
-
curl -L -o initial.patch https://huggingface.co/datasets/RedinGhost/beforedone-paper/resolve/main/benchmark/python/py-pilot-intword-boundary/initial.patch
695 Bytes
| diff --git a/tests/test_number.py b/tests/test_number.py | |
| index 78639c3..c52e1c6 100644 | |
| --- a/tests/test_number.py | |
| +++ b/tests/test_number.py | |
| def test_intword(test_args: list[str], expected: str) -> None: | |
| assert humanize.intword(*test_args) == expected | |
| +def test_intword_accepts_a_scale_separator() -> None: | |
| + assert humanize.intword(1_200_000, separator="") == "1.2million" | |
| + assert humanize.intword(-999_999, "%.0f", separator="_") == "-1_million" | |
| + assert humanize.intword(999, separator="_") == "999" | |
| + with pytest.raises(TypeError): | |
| + humanize.intword(1_000, separator=None) | |
| + | |
| + | |
| @pytest.mark.parametrize( | |
| "test_input, expected", | |
| [ | |