From f63fd3e53172edc0eaff3abe0f3dfbc40edf2341 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 22 Sep 2017 17:10:03 +0200 Subject: o Handling smaller numbers that we have units for. --- test/test_formatting.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_formatting.py b/test/test_formatting.py index 642b3de..bcb9300 100644 --- a/test/test_formatting.py +++ b/test/test_formatting.py @@ -81,6 +81,8 @@ def xx_test_eng_str3(input, expected): ("1 n", 0.000000001, "1 n", None), ("10 n", 0.00000001, "10 n", None), ("1p", 1e-12, "1 p", None), + ("0.8p", 8e-13, "0.8 p", None), + ("0.008p", 8e-15, "0.008 p", None), ]) def test_EeVal(s, num_value, str_value, unit): num_value = float(num_value) @@ -95,7 +97,7 @@ def test_EeVal(s, num_value, str_value, unit): ("10nF", "10 nF", "F"), ("10n F", "10 nF", "F"), ("10 n F", "10 nF", "F"), -# ("4.7 n F", "4.7 uF", "F"), + ("4.7 n F", "4.7 nF", "F"), ]) def test_EeVal_with_units(s, str_value, unit): v = EeVal(s) -- cgit v1.2.3