diff --git a/noxfile.py b/noxfile.py index bd1e55f..11ac9c5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,11 +1,12 @@ import nox +@nox.session +def lint(session): + session.install('ruff') + session.run('ruff', 'check', '--exclude', 'examples') + @nox.session def tests(session): session.install('pytest') session.run('pytest') -def lint(session): - session.install('flake8') - session.run('flake8', '--import-order-style', 'google') - diff --git a/tests/test_datatype.py b/tests/test_datatype.py new file mode 100644 index 0000000..83e2cb0 --- /dev/null +++ b/tests/test_datatype.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +import unittest + +import pyFroniusReg.froniusreg as froniusreg + +class TestDataTypes(unittest.testCase): + + def test_int16(self): + assert froniusreg.int16.decode(froniusreg.int16.encode(65536)) == 65535 + + +if __name__ == '__main__': + unittest.main() +