Skip to content

Commit

Permalink
should use partial
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Jun 30, 2023
1 parent 48a0c95 commit 7272b85
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions can/tests/test_packer_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import unittest
import random
from functools import partial

import cereal.messaging as messaging
from opendbc.can.parser import CANParser
Expand Down Expand Up @@ -324,8 +325,8 @@ def test_catches_missing_signals(self):
for msg, sigs in existing_signals.items():
for sig in sigs:
CANParser(TEST_DBC, [(sig, msg)], [], 0, enforce_checks=False)
self.assertRaises(RuntimeError, lambda: CANParser(TEST_DBC, [(sig + "123", msg)], [], 0, enforce_checks=False))
self.assertRaises(RuntimeError, lambda: CANParser(TEST_DBC, [(sig, msg + "123")], [], 0, enforce_checks=False))
self.assertRaises(RuntimeError, partial(CANParser, TEST_DBC, [(sig + "123", msg)], enforce_checks=False))
self.assertRaises(RuntimeError, partial(CANParser, TEST_DBC, [(sig, msg + "123")], enforce_checks=False))


if __name__ == "__main__":
Expand Down

0 comments on commit 7272b85

Please sign in to comment.