From f9a16187f3b4fda0790c34997ca24db749ddf86d Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Fri, 15 Dec 2017 00:41:37 +0100 Subject: o Fixing an EeVal parsing bug of '0 Ohms'. o Moving EeVal tests to it's main test file. --- src/ee/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ee/__init__.py b/src/ee/__init__.py index 7fa2243..2fad46d 100644 --- a/src/ee/__init__.py +++ b/src/ee/__init__.py @@ -46,7 +46,7 @@ class EeVal(object): exp = gs[1].strip() exp = EeVal.exponents.get(exp) if len(exp) > 0 else 0 unit = gs[2] - if value < 1: + if value != 0 and value < 1: e = math.ceil(math.log10(value)) exp = exp + e value = value * math.pow(10, -e) -- cgit v1.2.3