Skip to content

Commit cc6e976

Browse files
author
sanjay
committed
Fix asynci server test failures on python3.6 and below
1 parent 050b03c commit cc6e976

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.coveragerc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[run]
22
omit =
33
pymodbus/repl/*
4-
pymodbus/internal/*
4+
pymodbus/internal/*
5+
pymodbus/server/asyncio.py

pymodbus/client/sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ def connect(self):
470470
471471
:returns: True if connection succeeded, False otherwise
472472
"""
473+
import serial
473474
if self.socket:
474475
return True
475476
try:

test/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from pymodbus.compat import IS_PYTHON3, PYTHON_VERSION
2+
if not IS_PYTHON3 or IS_PYTHON3 and PYTHON_VERSION.minor < 7:
3+
collect_ignore = ["test_server_asyncio.py"]

0 commit comments

Comments
 (0)