@@ -92,46 +92,46 @@ def test_get_ack_failure(self):
92
92
93
93
def test_send_bytes (self ):
94
94
H = Handler ()
95
- H .send (CP .Byte .pack (0xFF ))
95
+ H ._send (CP .Byte .pack (0xFF ))
96
96
self .mock_Serial ().write .assert_called_with (CP .Byte .pack (0xFF ))
97
97
98
98
def test_send_byte (self ):
99
99
H = Handler ()
100
- H .send (0xFF )
100
+ H ._send (0xFF )
101
101
self .mock_Serial ().write .assert_called_with (CP .Byte .pack (0xFF ))
102
102
103
103
def test_send_byte_burst_mode (self ):
104
104
H = Handler ()
105
105
H .load_burst = True
106
- H .send (0xFF )
106
+ H ._send (0xFF )
107
107
self .assertEqual (H .burst_buffer , CP .Byte .pack (0xFF ))
108
108
109
109
def test_send_int (self ):
110
110
H = Handler ()
111
- H .send (0xFFFF )
111
+ H ._send (0xFFFF )
112
112
self .mock_Serial ().write .assert_called_with (CP .ShortInt .pack (0xFFFF ))
113
113
114
114
def test_send_int_burst_mode (self ):
115
115
H = Handler ()
116
116
H .load_burst = True
117
- H .send (0xFFFF )
117
+ H ._send (0xFFFF )
118
118
self .assertEqual (H .burst_buffer , CP .ShortInt .pack (0xFFFF ))
119
119
120
120
def test_send_long (self ):
121
121
H = Handler ()
122
- H .send (0xFFFFFFFF )
122
+ H ._send (0xFFFFFFFF )
123
123
self .mock_Serial ().write .assert_called_with (CP .Integer .pack (0xFFFFFFFF ))
124
124
125
125
def test_send_long_burst_mode (self ):
126
126
H = Handler ()
127
127
H .load_burst = True
128
- H .send (0xFFFFFFFF )
128
+ H ._send (0xFFFFFFFF )
129
129
self .assertEqual (H .burst_buffer , CP .Integer .pack (0xFFFFFFFF ))
130
130
131
131
def test_receive (self ):
132
132
H = Handler ()
133
133
self .mock_Serial ().read .return_value = CP .Byte .pack (0xFF )
134
- r = H .receive (1 )
134
+ r = H ._receive (1 )
135
135
self .mock_Serial ().read .assert_called_with (1 )
136
136
self .assertEqual (r , 0xFF )
137
137
@@ -140,14 +140,14 @@ def test_receive_uneven_bytes(self):
140
140
self .mock_Serial ().read .return_value = int .to_bytes (
141
141
0xFFFFFF , length = 3 , byteorder = "little" , signed = False
142
142
)
143
- r = H .receive (3 )
143
+ r = H ._receive (3 )
144
144
self .mock_Serial ().read .assert_called_with (3 )
145
145
self .assertEqual (r , 0xFFFFFF )
146
146
147
147
def test_receive_failure (self ):
148
148
H = Handler ()
149
149
self .mock_Serial ().read .return_value = b""
150
- r = H .receive (1 )
150
+ r = H ._receive (1 )
151
151
self .mock_Serial ().read .assert_called_with (1 )
152
152
self .assertEqual (r , - 1 )
153
153
@@ -165,7 +165,7 @@ def test_send_burst(self):
165
165
H .load_burst = True
166
166
167
167
for b in b"abc" :
168
- H .send (b )
168
+ H ._send (b )
169
169
H .get_ack ()
170
170
171
171
self .mock_Serial ().read .return_value = b"\x01 \x01 \x01 "
0 commit comments