Skip to content

Commit f466593

Browse files
committed
Fix tests
1 parent 785c7ac commit f466593

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,17 @@ check: install
4242
test: install
4343
@pip install --upgrade --quiet --requirement=requirements-tests.txt
4444
ifeq ($(PYVER),3.6)
45+
$(info Running tests on $(PYVER))
4546
@pytest --cov=pymodbus/ --cov-report term-missing test/test_server_asyncio.py test
4647
@coverage report --fail-under=90 -i
47-
else
48+
else ifeq ($(PYVER),2.7)
49+
$(info Running tests on $(PYVER))
4850
@pytest --cov-config=.coveragerc --cov=pymodbus/ --cov-report term-missing --ignore test/test_server_asyncio.py test
4951
@coverage report --fail-under=90 -i
52+
else
53+
$(info Running tests on $(PYVER))
54+
@pytest --cov=pymodbus/ --cov-report term-missing test
55+
@coverage report --fail-under=90 -i
5056
endif
5157

5258
tox: install

pymodbus/client/asynchronous/tornado/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def __init__(self, *args, **kwargs):
315315
self.silent_interval = 3.5 * self._t0
316316
self.silent_interval = round(self.silent_interval, 6)
317317
self.last_frame_end = 0.0
318-
super().__init__(*args, **kwargs)
318+
super(AsyncModbusSerialClient, self).__init__(*args, **kwargs)
319319

320320
def get_socket(self):
321321
"""

pymodbus/server/async_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ async def handle(self):
182182
# for UDP sockets, simply reset the frame
183183
if isinstance(self, ModbusConnectedRequestHandler):
184184
client_addr = self.client_address[:2]
185-
_logger.error("Unknown exception '%s' on stream [%s:%s] "
186-
"forcing disconnect" % (e, client_addr))
185+
_logger.error("Unknown exception '{}' on stream {} "
186+
"forcing disconnect".format(e, client_addr))
187187
self.transport.close()
188188
else:
189189
_logger.error("Unknown error occurred %s" % e)

0 commit comments

Comments
 (0)