@@ -84,38 +84,38 @@ def test_rx_tx_data_none(self):
8484 msg_receive = self .bus .recv ()
8585 self .assertMessageEqual (msg , msg_receive )
8686
87- def test_rx_tx_min_id (self ):
87+ def test_rx_tx_min_std_id (self ):
8888 """
89- Tests the transfer with the lowest extended arbitration id
89+ Tests the transfer with the lowest standard arbitration id
9090 """
91- msg = can .Message (arbitration_id = 0 )
91+ msg = can .Message (arbitration_id = 0 , is_extended_id = False )
9292 self .bus .send (msg )
9393 msg_receive = self .bus .recv ()
9494 self .assertMessageEqual (msg , msg_receive )
9595
96- def test_rx_tx_max_id (self ):
96+ def test_rx_tx_max_std_id (self ):
9797 """
98- Tests the transfer with the highest extended arbitration id
98+ Tests the transfer with the highest standard arbitration id
9999 """
100- msg = can .Message (arbitration_id = 536870911 )
100+ msg = can .Message (arbitration_id = 0x7FF , is_extended_id = False )
101101 self .bus .send (msg )
102102 msg_receive = self .bus .recv ()
103103 self .assertMessageEqual (msg , msg_receive )
104104
105- def test_rx_tx_min_nonext_id (self ):
105+ def test_rx_tx_min_ext_id (self ):
106106 """
107- Tests the transfer with the lowest non- extended arbitration id
107+ Tests the transfer with the lowest extended arbitration id
108108 """
109- msg = can .Message (arbitration_id = 0x000 , is_extended_id = False )
109+ msg = can .Message (arbitration_id = 0x000 , is_extended_id = True )
110110 self .bus .send (msg )
111111 msg_receive = self .bus .recv ()
112112 self .assertMessageEqual (msg , msg_receive )
113113
114- def test_rx_tx_max_nonext_id (self ):
114+ def test_rx_tx_max_ext_id (self ):
115115 """
116- Tests the transfer with the highest non- extended arbitration id
116+ Tests the transfer with the highest extended arbitration id
117117 """
118- msg = can .Message (arbitration_id = 0x7FF , is_extended_id = False )
118+ msg = can .Message (arbitration_id = 0x1FFFFFFF , is_extended_id = True )
119119 self .bus .send (msg )
120120 msg_receive = self .bus .recv ()
121121 self .assertMessageEqual (msg , msg_receive )
@@ -155,6 +155,28 @@ def test_rx_tx_min_timestamp_error(self):
155155 msg = can .Message (timestamp = - 1 )
156156 self .assertRaises (ValueError , self .bus .send , msg )
157157
158+ def test_rx_tx_err_frame (self ):
159+ """
160+ Test the transfer of error frames.
161+ """
162+ msg = can .Message (
163+ is_extended_id = False , is_error_frame = True , is_remote_frame = False
164+ )
165+ self .bus .send (msg )
166+ msg_receive = self .bus .recv ()
167+ self .assertMessageEqual (msg , msg_receive )
168+
169+ def test_rx_tx_rtr_frame (self ):
170+ """
171+ Test the transfer of remote frames.
172+ """
173+ msg = can .Message (
174+ is_extended_id = False , is_error_frame = False , is_remote_frame = True
175+ )
176+ self .bus .send (msg )
177+ msg_receive = self .bus .recv ()
178+ self .assertMessageEqual (msg , msg_receive )
179+
158180 def test_when_no_fileno (self ):
159181 """
160182 Tests for the fileno method catching the missing pyserial implementeation on the Windows platform
0 commit comments