Skip to content

Commit a0ca72c

Browse files
committed
Add test for no execption with spr
1 parent 54cce4e commit a0ca72c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/client/test_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,15 @@ def _test_suppress_positive_response_wait_nrc_case4(self):
281281
req = Request(service=services.TesterPresent, subfunction=0)
282282
with self.udsclient.suppress_positive_response(wait_nrc=True):
283283
self.udsclient.send_request(req)
284+
285+
def test_suppress_positive_response_wait_nrc_case5(self):
286+
self.conn.touserqueue.get(timeout=0.2)
287+
self.conn.fromuserqueue.put(b"\x7F\x3E\x31")
288+
289+
def _test_suppress_positive_response_wait_nrc_case5(self):
290+
# Case 3 - Negative and wait
291+
req = Request(service=services.TesterPresent, subfunction=0)
292+
self.udsclient.config['exception_on_negative_response'] = False
293+
with self.udsclient.suppress_positive_response(wait_nrc=True):
294+
resp = self.udsclient.tester_present()
295+
self.assertIsNotNone(resp)

0 commit comments

Comments
 (0)