3 Commits

Author SHA1 Message Date
Marcel Nijenhof
230b929b4c Correctie druine build
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-12-08 17:46:24 +01:00
Marcel Nijenhof
a884a5295b BUG Bix:
Some checks failed
continuous-integration/drone/push Build is failing
LmwSip().lasttime("H10") --> LmwSip(host=None).lasttime("H10")

  Dit voorkomt het opzetten van een connectie.
  Dit veroorzaakte ook problemen in de zelftest.
2021-12-08 16:58:00 +01:00
Marcel Nijenhof
3414fde39c SYNTAX Correctie: log --> logging 2021-12-08 16:57:06 +01:00
3 changed files with 7 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ platform:
steps: steps:
- name: Build package files - name: Build package files
commands: commands:
- python setup.py sdist bdist_wheel - python3 setup.py sdist bdist_wheel
- name: Versie toevoegen aan download - name: Versie toevoegen aan download
environment: environment:

View File

@@ -8,6 +8,7 @@ from lmwsip import LmwSip
def run(args): def run(args):
logging.basicConfig(level=args.debug) logging.basicConfig(level=args.debug)
logging.debug("lmwsip.run %s" % args)
try: try:
lmwsip = LmwSip(host=args.host, port=args.port, lmwsip = LmwSip(host=args.host, port=args.port,
ssl=not args.unencrypted, ssl=not args.unencrypted,
@@ -33,7 +34,7 @@ def run(args):
pass pass
def main(): def main():
lastTime=LmwSip().lasttime("H10") lastTime=LmwSip(host=None).lasttime("H10")
parser = argparse.ArgumentParser(description="Run a sip file.") parser = argparse.ArgumentParser(description="Run a sip file.")
parser.add_argument("-u", "--unencrypted", action="store_true", parser.add_argument("-u", "--unencrypted", action="store_true",
help="Run a sip connection without ssl") help="Run a sip connection without ssl")

View File

@@ -39,19 +39,19 @@ class lmwsipTest(unittest.TestCase):
self.assertEqual(type(self.sip), lmwsip.LmwSip) self.assertEqual(type(self.sip), lmwsip.LmwSip)
def test_H1(self): def test_H1(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
self.assertEqual(self.sip.period('H1'), 1) self.assertEqual(self.sip.period('H1'), 1)
def test_H10(self): def test_H10(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
self.assertEqual(self.sip.period('H10'), 10) self.assertEqual(self.sip.period('H10'), 10)
def test_xHm0(self): def test_xHm0(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
self.assertEqual(self.sip.period('xHm0'), 10) self.assertEqual(self.sip.period('xHm0'), 10)
def test_Noparm(self): def test_Noparm(self):
self.sip = lmwsip.LmwSip() self.sip = lmwsip.LmwSip(host=None)
with self.assertRaises(lmwsip.LmwParmWarn): with self.assertRaises(lmwsip.LmwParmWarn):
self.assertEqual(self.sip.period('Noparm'), None) self.assertEqual(self.sip.period('Noparm'), None)