@@ -631,7 +631,7 @@ def test_send_diagnostic_times_out_when_only_invalid_source_ack_nack(mock_socket
631631 sut = DoIPClient (test_ip , test_logical_address )
632632 mock_socket .rx_queue .append (diagnostic_ack_invalid_source )
633633 mock_socket .rx_queue .append (diagnostic_nack_invalid_source )
634- with pytest .raises (TimeoutError , match = r"ECU failed to respond in time" ):
634+ with pytest .raises (TimeoutError ):
635635 sut .send_diagnostic (bytearray ([0 , 1 , 2 ]), timeout = 0.01 )
636636 assert mock_socket .tx_queue [- 1 ] == diagnostic_request
637637
@@ -640,7 +640,7 @@ def test_send_diagnostic_times_out_when_only_invalid_target_ack_nack(mock_socket
640640 sut = DoIPClient (test_ip , test_logical_address )
641641 mock_socket .rx_queue .append (diagnostic_ack_invalid_target )
642642 mock_socket .rx_queue .append (diagnostic_nack_invalid_target )
643- with pytest .raises (TimeoutError , match = r"ECU failed to respond in time" ):
643+ with pytest .raises (TimeoutError ):
644644 sut .send_diagnostic (bytearray ([0 , 1 , 2 ]), timeout = 0.01 )
645645 assert mock_socket .tx_queue [- 1 ] == diagnostic_request
646646
@@ -710,7 +710,7 @@ def test_send_diagnostic_to_address_times_out_when_only_invalid_source_ack_nack(
710710 sut = DoIPClient (test_ip , test_logical_address )
711711 mock_socket .rx_queue .append (diagnostic_ack_to_address_invalid_source )
712712 mock_socket .rx_queue .append (diagnostic_nack_to_address_invalid_source )
713- with pytest .raises (TimeoutError , match = r"ECU failed to respond in time" ):
713+ with pytest .raises (TimeoutError ):
714714 sut .send_diagnostic_to_address (0x1234 , bytearray ([0 , 1 , 2 ]), timeout = 0.01 )
715715 assert mock_socket .tx_queue [- 1 ] == diagnostic_request_to_address
716716
@@ -721,7 +721,7 @@ def test_send_diagnostic_to_address_times_out_when_only_invalid_target_ack_nack(
721721 sut = DoIPClient (test_ip , test_logical_address )
722722 mock_socket .rx_queue .append (diagnostic_ack_to_address_invalid_target )
723723 mock_socket .rx_queue .append (diagnostic_nack_to_address_invalid_target )
724- with pytest .raises (TimeoutError , match = r"ECU failed to respond in time" ):
724+ with pytest .raises (TimeoutError ):
725725 sut .send_diagnostic_to_address (0x1234 , bytearray ([0 , 1 , 2 ]), timeout = 0.01 )
726726 assert mock_socket .tx_queue [- 1 ] == diagnostic_request_to_address
727727
@@ -735,7 +735,7 @@ def test_receive_diagnostic(mock_socket):
735735
736736def test_receive_diagnostic_timeout (mock_socket ):
737737 sut = DoIPClient (test_ip , test_logical_address )
738- with pytest .raises (TimeoutError , match = r"ECU failed to respond in time" ):
738+ with pytest .raises (TimeoutError ):
739739 sut .receive_diagnostic (timeout = 0.01 )
740740
741741
0 commit comments