Marc-André Lureau <marcandre.lur...@redhat.com> writes: > Hi > > ----- Original Message ----- >> Marc-André Lureau <marcandre.lur...@redhat.com> writes: [...] >> > diff --git a/tests/qapi-schema/test-qapi.py >> > b/tests/qapi-schema/test-qapi.py >> > index 70054848f0..5d2f67a1d3 100644 >> > --- a/tests/qapi-schema/test-qapi.py >> > +++ b/tests/qapi-schema/test-qapi.py >> > @@ -31,7 +31,8 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor): >> > print ' base %s' % base.name >> > for m in members: >> > print ' member %s: %s optional=%s' % \ >> > - (m.name, m.type.name, m.optional) >> > + (m.name, m.type.name, m.optional) + \ >> > + (' if=%s' % m.ifcond if m.ifcond else '') >> >> Let's keep it simple & stupid: >> >> print ' member %s: %s optional=%s if=%s' % \ >> (m.name, m.type.name, m.optional, m.ifcond) >> > > I would rather not modify every existing test please. > > The last version of the series uses the trailing , trick instead: > > print '%s optional=%s' % (m.type.name, m.optional), > if m.ifcond: > print 'if=%s' % m.ifcond, > print > > I think this is easier to deal with, is that ok for you too?
Yes. >> > self._print_variants(variants) >> > self._print_if(ifcond) >> >> Need negative tests, but I guess they're next. >>