halfway through tests
This commit is contained in:
parent
a833069eb5
commit
4b65df2949
1 changed files with 6 additions and 1 deletions
|
@ -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__':
|
||||
|
|
Loading…
Reference in a new issue