Skip to content

Commit

Permalink
add unittest skip condition for unsupported targets, remove failing a…
Browse files Browse the repository at this point in the history
…ssertion from unsupported targets, use lower asynctest version
  • Loading branch information
cleandesign-contrib committed May 19, 2019
1 parent c5c2d2d commit 985d0cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ verboselogs >= 1.5
tornado==4.5.3
Twisted>=17.1.0
zope.interface>=4.4.0
asynctest>=0.13.0
asynctest>=0.10.0
5 changes: 2 additions & 3 deletions test/test_server_asyncio.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env python
from pymodbus.compat import IS_PYTHON3
import pytest
import asynctest
import asyncio
import logging
_logger = logging.getLogger()
if IS_PYTHON3: # Python 3
from asynctest.mock import patch, Mock, MagicMock
else:
assert(False, "asyncio is not available pre-python 3.6")

from pymodbus.device import ModbusDeviceIdentification
from pymodbus.factory import ServerDecoder
Expand Down Expand Up @@ -36,7 +35,7 @@
IS_HIGH_SIERRA_OR_ABOVE = False
SERIAL_PORT = "/dev/ptmx"


@pytest.mark.skipif(not IS_PYTHON3, reason="requires python3.4 or above")
class AsyncioServerTest(asynctest.TestCase):
'''
This is the unittest for the pymodbus.server.asyncio module
Expand Down

0 comments on commit 985d0cf

Please sign in to comment.