mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
autotest: add an assert_receive_message method
This commit is contained in:
parent
4fa2c3f5ba
commit
d0b97b89e7
@ -2157,6 +2157,12 @@ class AutoTest(ABC):
|
||||
raise ValueError("count %u not handled" % count)
|
||||
self.progress("Files same")
|
||||
|
||||
def assert_receive_message(self, type, timeout=1):
|
||||
m = self.mav.recv_match(type=type, blocking=True, timeout=timeout)
|
||||
if m is None:
|
||||
raise NotAchievedException("Did not get %s" % type)
|
||||
return m
|
||||
|
||||
def assert_rally_files_same(self, file1, file2):
|
||||
self.progress("Comparing (%s) and (%s)" % (file1, file2, ))
|
||||
f1 = open(file1)
|
||||
|
Loading…
Reference in New Issue
Block a user