19 lines
407 B
Python
19 lines
407 B
Python
#!/usr/bin/env python3
|
|
import unittest
|
|
|
|
import pyfroniusreg.froniusreg as froniusreg
|
|
|
|
class RegisterValue():
|
|
def __init__(self, value):
|
|
self.registers = value
|
|
|
|
class TestDataTypes(unittest.TestCase):
|
|
|
|
def test_int16(self):
|
|
value = RegisterValue(froniusreg.int16.encode(1024)[0])
|
|
assert froniusreg.int16.decode(value) == 1024
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|
|
|