Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify requirements versions and adapt to non positional arguments #77

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion software/hwio-raspberry/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymodbus
pymodbus==3.7.4
smbus
nmcli
RPi.GPIO
2 changes: 1 addition & 1 deletion software/hwio-virtual/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pymodbus
pymodbus==3.7.4
nicegui
14 changes: 7 additions & 7 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pytest
pytest-cov
pytest-asyncio
pymodbus
asyncio
asyncua
requests
pytest==8.3.4
pytest-cov==6.0.0
pytest-asyncio==0.25.0
pymodbus==3.7.4
asyncio==3.4.3
asyncua==1.1.0
requests==2.25.1
4 changes: 2 additions & 2 deletions tests/test_modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_read_holding_register(modbus_client):
"""
# Address of the register (Modbus address is often 0-based)
register_address = 1
result = modbus_client.read_holding_registers(register_address, 1)
result = modbus_client.read_holding_registers(register_address, count=1)

# Check if we received a valid response
assert result is not None, "No response from the Modbus server"
Expand All @@ -73,7 +73,7 @@ def test_write_single_register(modbus_client):
assert not result.isError(), f"Modbus error: {result}"

# Verify that the value was written correctly by reading it back
read_result = modbus_client.read_holding_registers(register_address, 1)
read_result = modbus_client.read_holding_registers(register_address, count=1)
assert read_result.registers[0] == value_to_write, f"Expected {value_to_write}, got {read_result.registers[0]}"

@pytest.mark.asyncio
Expand Down
Loading