From 4b65df29498d7cb25bfb6c5cfbd60db765dbe7fd Mon Sep 17 00:00:00 2001 From: Paul Warren Date: Wed, 9 Oct 2024 18:37:45 +1100 Subject: [PATCH] halfway through tests --- tests/test_datatype.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_datatype.py b/tests/test_datatype.py index fb1176f..93bad69 100644 --- a/tests/test_datatype.py +++ b/tests/test_datatype.py @@ -3,10 +3,15 @@ import unittest import pyfroniusreg.froniusreg as froniusreg +class RegisterValue(): + def __init__(self, value): + self.registers = value + class TestDataTypes(unittest.TestCase): def test_int16(self): - assert froniusreg.int16.decode(froniusreg.int16.encode(1024)) == 1024 + value = RegisterValue(froniusreg.int16.encode(1024)[0]) + assert froniusreg.int16.decode(value) == 1024 if __name__ == '__main__':