pyFroniusReg/tests/test_datatype.py

15 lines
310 B
Python
Raw Normal View History

2024-10-09 17:08:43 +11:00
#!/usr/bin/env python3
import unittest
2024-10-09 18:18:24 +11:00
import pyfroniusreg.froniusreg as froniusreg
2024-10-09 17:08:43 +11:00
2024-10-14 17:02:50 +11:00
class TestDataTypes(unittest.TestCase):
2024-10-09 17:08:43 +11:00
def test_int16(self):
2024-10-11 08:47:23 +11:00
int16_buffer = froniusreg.int16.encode_to_buffer(1024)
2024-10-14 17:02:50 +11:00
assert int16_buffer == [b"\x04\x00"]
2024-10-09 17:08:43 +11:00
2024-10-14 17:02:50 +11:00
if __name__ == "__main__":
2024-10-09 17:08:43 +11:00
unittest.main()