Skip to content

Commit 0dc0f60

Browse files
committed
Trying to track down sporadic failure on CI.
Ensure messages are compared with Messages and reduce sleep on failing test
1 parent 295fb5b commit 0dc0f60

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

can/message.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def __repr__(self):
9696
return "can.Message({})".format(", ".join(args))
9797

9898
def __eq__(self, other):
99-
return (self.arbitration_id == other.arbitration_id and
99+
return (isinstance(other, self.__class__) and
100+
self.arbitration_id == other.arbitration_id and
100101
#self.timestamp == other.timestamp and
101102
self.id_type == other.id_type and
102103
self.dlc == other.dlc and

test/listener_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_sql_reader(self):
167167
f.close()
168168
a_listener = can.SqliteWriter(f.name)
169169
a_listener(generate_message(0xDADADA))
170-
sleep(0.5)
170+
sleep(0.1)
171171
a_listener.stop()
172172

173173
reader = can.SqlReader(f.name)

0 commit comments

Comments
 (0)