File size: 686 Bytes
598316f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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
@@ -315,3 +315,10 @@ 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"
|