2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

test/analyzer: check that last message is StoppedMessage

This commit is contained in:
Sebastien Bourdeauducq 2016-03-15 21:44:56 +08:00
parent 1bbef94061
commit 9ffaf82877

View File

@ -1,5 +1,6 @@
from artiq.experiment import *
from artiq.coredevice.analyzer import decode_dump, OutputMessage, InputMessage
from artiq.coredevice.analyzer import (decode_dump, StoppedMessage,
OutputMessage, InputMessage)
from artiq.test.hardware_testbench import ExperimentCase
@ -30,6 +31,7 @@ class AnalyzerTest(ExperimentCase):
exp.run()
dump = decode_dump(comm.get_analyzer_dump())
self.assertIsInstance(dump.messages[-1], StoppedMessage)
output_messages = [msg for msg in dump.messages
if isinstance(msg, OutputMessage)
and msg.address == 0]