mirror of
https://gitee.com/open-loongarch/buildroot-2024.08.git
synced 2026-10-28 05:57:13 +08:00
first commit: base 2024.08
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import minimalmodbus
|
||||
from serial.serialutil import SerialException
|
||||
|
||||
# We can't test proper behaviour in emulation, because there is
|
||||
# actually no emulated modbus hardware, so we rely on the module
|
||||
# to fail in an expected way to consider it is working correctly.
|
||||
# Failure (of the script) is success (of the test)!
|
||||
try:
|
||||
instrument = minimalmodbus.Instrument('/dev/ttyUSB99', 1)
|
||||
except SerialException:
|
||||
pass
|
||||
Reference in New Issue
Block a user