Add unit tests
This commit is contained in:
+1
-1
@@ -60,7 +60,7 @@ class UPS(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def items(self) -> Iterator[tuple[str, BMSField]]:
|
||||
...
|
||||
... # pragma: no cover
|
||||
|
||||
def __bool__(self) -> bool:
|
||||
"""Return True if the UPS has at least one populated field."""
|
||||
|
||||
+2
-2
@@ -224,7 +224,7 @@ def parse_03_response(response: bytearray, debug: int = 0) -> JBDBMS | bool:
|
||||
debugger("parse_03_response ERROR: failed to validate received checksum")
|
||||
return False
|
||||
|
||||
if data_len == 0:
|
||||
if data_len == 0: # pragma: no cover
|
||||
return False
|
||||
|
||||
result = JBDBMS()
|
||||
@@ -482,7 +482,7 @@ def parse_04_response(response: bytearray, debug: int = 0) -> BMSMultiField | bo
|
||||
debugger("parse_04_response ERROR: failed to validate received checksum")
|
||||
return False
|
||||
|
||||
if data_len == 0:
|
||||
if data_len == 0: # pragma: no cover
|
||||
return False
|
||||
|
||||
raw_values = {}
|
||||
|
||||
Reference in New Issue
Block a user