add more unittests for solarman_v5.py

This commit is contained in:
Stefan Allius
2024-04-14 12:30:07 +02:00
parent 05b576b198
commit ac0bf2f8f8
3 changed files with 144 additions and 13 deletions

View File

@@ -186,12 +186,12 @@ class SolarmanV5(Message):
type += 'S'
return switch.get(type, '???')
def _timestamp(self): # pragma: no cover
def _timestamp(self):
# utc as epoche
return int(time.time())
return int(time.time()) # pragma: no cover
def _heartbeat(self) -> int:
return 60
return 60 # pragma: no cover
def __parse_header(self, buf: bytes, buf_len: int) -> None:

View File

@@ -76,7 +76,7 @@ class Message(metaclass=IterRegistry):
def _update_header(self, _forward_buffer):
'''callback for updating the header of the forward buffer'''
return
return # pragma: no cover
'''
Our puplic methods