def test_requires_stop_declaration(self) -> None:
        body = DummyPulseTemplate(requires_stop=False)
        t = RepetitionPulseTemplate(body, ParameterDeclaration("foo"))

        parameter = DummyParameter()
        parameters = dict(foo=parameter)

        parameter.requires_stop_ = False
        self.assertFalse(t.requires_stop(parameters))
        parameter.requires_stop_ = True
        self.assertTrue(t.requires_stop(parameters))

        body.requires_stop_ = True
        parameter.requires_stop_ = False
        self.assertFalse(t.requires_stop(parameters))
        parameter.requires_stop_ = True
        self.assertTrue(t.requires_stop(parameters))
 def test_requires_stop_constant(self) -> None:
     body = DummyPulseTemplate(requires_stop=False)
     t = RepetitionPulseTemplate(body, 2)
     self.assertFalse(t.requires_stop({}))
     body.requires_stop_ = True
     self.assertFalse(t.requires_stop({}))