Noxfile adjustment, simple test
This commit is contained in:
parent
dd923fbaa7
commit
d489d2c5b9
2 changed files with 19 additions and 4 deletions
|
@ -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')
|
||||
|
||||
|
|
14
tests/test_datatype.py
Normal file
14
tests/test_datatype.py
Normal file
|
@ -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()
|
||||
|
Loading…
Reference in a new issue