Skip to content

Commit bf6bf84

Browse files
osom8979claude
andcommitted
fix(test): Add ClassVar annotations to modbus tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 85552c9 commit bf6bf84

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

tester/modbus/test_function_codes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
import time
4+
from typing import ClassVar
45
from unittest import TestCase, main
56

67
from cvp.modbus.client import ModbusTcpClient
@@ -9,6 +10,9 @@
910

1011

1112
class TestFunctionCodes(TestCase):
13+
datastore: ClassVar[ModbusDataStore]
14+
server: ClassVar[ModbusTcpServer]
15+
1216
@classmethod
1317
def setUpClass(cls) -> None:
1418
cls.datastore = ModbusDataStore()

tester/modbus/test_server_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
import time
4+
from typing import ClassVar
45
from unittest import TestCase, main
56

67
from cvp.modbus.client import ModbusTcpClient
@@ -9,6 +10,9 @@
910

1011

1112
class TestServerClientIntegration(TestCase):
13+
datastore: ClassVar[ModbusDataStore]
14+
server: ClassVar[ModbusTcpServer]
15+
1216
@classmethod
1317
def setUpClass(cls) -> None:
1418
cls.datastore = ModbusDataStore()

0 commit comments

Comments
 (0)