Skip to content

Commit

Permalink
Based on how the data is being sent to various tests and 'equals' met…
Browse files Browse the repository at this point in the history
…hod in the Message class, modified the equal method to make sure that the data being read is equal to the DLC. This is a temporary fix till we agree on what data should be used in the tests, especially pertaining to the BLFReader / BLFWriter constructors
  • Loading branch information
Pratik Mahamuni committed Aug 16, 2024
1 parent 8966e38 commit c4f2b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion can/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def equals(
and self.arbitration_id == other.arbitration_id
and self.is_extended_id == other.is_extended_id
and self.dlc == other.dlc
and self.data == other.data
and self.data[: self.dlc] == other.data[: other.dlc]
and self.is_remote_frame == other.is_remote_frame
and self.is_error_frame == other.is_error_frame
and (self.channel == other.channel or not check_channel)
Expand Down

0 comments on commit c4f2b92

Please sign in to comment.