@@ -188,12 +188,52 @@ def test_recv_fd(self):
188188 self .assertEqual (msg .is_fd , True )
189189 self .assertEqual (msg .bitrate_switch , False )
190190 self .assertEqual (msg .dlc , 16 )
191- self .assertSequenceEqual (msg .data , [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ])
191+ self .assertSequenceEqual (
192+ msg .data ,
193+ [
194+ 0x30 ,
195+ 0x31 ,
196+ 0x32 ,
197+ 0x33 ,
198+ 0x34 ,
199+ 0x35 ,
200+ 0x36 ,
201+ 0x37 ,
202+ 0x38 ,
203+ 0x39 ,
204+ 0x3A ,
205+ 0x3B ,
206+ 0x3C ,
207+ 0x3D ,
208+ 0x3E ,
209+ 0x3F ,
210+ ],
211+ )
192212
193213 def test_send_fd (self ):
194214 payload = b"d123A303132333435363738393A3B3C3D3E3F\r "
195215 msg = can .Message (
196- arbitration_id = 0x123 , is_extended_id = False , is_fd = True , data = [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ]
216+ arbitration_id = 0x123 ,
217+ is_extended_id = False ,
218+ is_fd = True ,
219+ data = [
220+ 0x30 ,
221+ 0x31 ,
222+ 0x32 ,
223+ 0x33 ,
224+ 0x34 ,
225+ 0x35 ,
226+ 0x36 ,
227+ 0x37 ,
228+ 0x38 ,
229+ 0x39 ,
230+ 0x3A ,
231+ 0x3B ,
232+ 0x3C ,
233+ 0x3D ,
234+ 0x3E ,
235+ 0x3F ,
236+ ],
197237 )
198238 self .bus .send (msg )
199239 self .assertEqual (payload , self .serial .get_output_buffer ())
@@ -212,12 +252,52 @@ def test_recv_fd_extended(self):
212252 self .assertEqual (msg .dlc , 16 )
213253 self .assertEqual (msg .bitrate_switch , False )
214254 self .assertTrue (msg .is_fd )
215- self .assertSequenceEqual (msg .data , [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ])
255+ self .assertSequenceEqual (
256+ msg .data ,
257+ [
258+ 0x30 ,
259+ 0x31 ,
260+ 0x32 ,
261+ 0x33 ,
262+ 0x34 ,
263+ 0x35 ,
264+ 0x36 ,
265+ 0x37 ,
266+ 0x38 ,
267+ 0x39 ,
268+ 0x3A ,
269+ 0x3B ,
270+ 0x3C ,
271+ 0x3D ,
272+ 0x3E ,
273+ 0x3F ,
274+ ],
275+ )
216276
217277 def test_send_fd_extended (self ):
218278 payload = b"D12ABCDEFA303132333435363738393A3B3C3D3E3F\r "
219279 msg = can .Message (
220- arbitration_id = 0x12ABCDEF , is_extended_id = True , is_fd = True , data = [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ]
280+ arbitration_id = 0x12ABCDEF ,
281+ is_extended_id = True ,
282+ is_fd = True ,
283+ data = [
284+ 0x30 ,
285+ 0x31 ,
286+ 0x32 ,
287+ 0x33 ,
288+ 0x34 ,
289+ 0x35 ,
290+ 0x36 ,
291+ 0x37 ,
292+ 0x38 ,
293+ 0x39 ,
294+ 0x3A ,
295+ 0x3B ,
296+ 0x3C ,
297+ 0x3D ,
298+ 0x3E ,
299+ 0x3F ,
300+ ],
221301 )
222302 self .bus .send (msg )
223303 self .assertEqual (payload , self .serial .get_output_buffer ())
@@ -236,12 +316,53 @@ def test_recv_fd_brs(self):
236316 self .assertEqual (msg .is_fd , True )
237317 self .assertEqual (msg .bitrate_switch , True )
238318 self .assertEqual (msg .dlc , 16 )
239- self .assertSequenceEqual (msg .data , [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ])
319+ self .assertSequenceEqual (
320+ msg .data ,
321+ [
322+ 0x30 ,
323+ 0x31 ,
324+ 0x32 ,
325+ 0x33 ,
326+ 0x34 ,
327+ 0x35 ,
328+ 0x36 ,
329+ 0x37 ,
330+ 0x38 ,
331+ 0x39 ,
332+ 0x3A ,
333+ 0x3B ,
334+ 0x3C ,
335+ 0x3D ,
336+ 0x3E ,
337+ 0x3F ,
338+ ],
339+ )
240340
241341 def test_send_fd_brs (self ):
242342 payload = b"b123A303132333435363738393A3B3C3D3E3F\r "
243343 msg = can .Message (
244- arbitration_id = 0x123 , is_extended_id = False , is_fd = True , bitrate_switch = True , data = [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ]
344+ arbitration_id = 0x123 ,
345+ is_extended_id = False ,
346+ is_fd = True ,
347+ bitrate_switch = True ,
348+ data = [
349+ 0x30 ,
350+ 0x31 ,
351+ 0x32 ,
352+ 0x33 ,
353+ 0x34 ,
354+ 0x35 ,
355+ 0x36 ,
356+ 0x37 ,
357+ 0x38 ,
358+ 0x39 ,
359+ 0x3A ,
360+ 0x3B ,
361+ 0x3C ,
362+ 0x3D ,
363+ 0x3E ,
364+ 0x3F ,
365+ ],
245366 )
246367 self .bus .send (msg )
247368 self .assertEqual (payload , self .serial .get_output_buffer ())
@@ -260,12 +381,53 @@ def test_recv_fd_brs_extended(self):
260381 self .assertEqual (msg .dlc , 16 )
261382 self .assertEqual (msg .bitrate_switch , True )
262383 self .assertTrue (msg .is_fd )
263- self .assertSequenceEqual (msg .data , [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ])
384+ self .assertSequenceEqual (
385+ msg .data ,
386+ [
387+ 0x30 ,
388+ 0x31 ,
389+ 0x32 ,
390+ 0x33 ,
391+ 0x34 ,
392+ 0x35 ,
393+ 0x36 ,
394+ 0x37 ,
395+ 0x38 ,
396+ 0x39 ,
397+ 0x3A ,
398+ 0x3B ,
399+ 0x3C ,
400+ 0x3D ,
401+ 0x3E ,
402+ 0x3F ,
403+ ],
404+ )
264405
265406 def test_send_fd_brs_extended (self ):
266407 payload = b"B12ABCDEFA303132333435363738393A3B3C3D3E3F\r "
267408 msg = can .Message (
268- arbitration_id = 0x12ABCDEF , is_extended_id = True , is_fd = True , bitrate_switch = True , data = [0x30 , 0x31 , 0x32 , 0x33 , 0x34 , 0x35 , 0x36 , 0x37 , 0x38 , 0x39 , 0x3A , 0x3B , 0x3C , 0x3D , 0x3E , 0x3F ]
409+ arbitration_id = 0x12ABCDEF ,
410+ is_extended_id = True ,
411+ is_fd = True ,
412+ bitrate_switch = True ,
413+ data = [
414+ 0x30 ,
415+ 0x31 ,
416+ 0x32 ,
417+ 0x33 ,
418+ 0x34 ,
419+ 0x35 ,
420+ 0x36 ,
421+ 0x37 ,
422+ 0x38 ,
423+ 0x39 ,
424+ 0x3A ,
425+ 0x3B ,
426+ 0x3C ,
427+ 0x3D ,
428+ 0x3E ,
429+ 0x3F ,
430+ ],
269431 )
270432 self .bus .send (msg )
271433 self .assertEqual (payload , self .serial .get_output_buffer ())
0 commit comments