]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qapi-schema/qapi-schema-test.out
tests/qapi-schema: Hide OrderedDict in test output
authorMarkus Armbruster <armbru@redhat.com>
Tue, 31 Aug 2021 12:38:07 +0000 (14:38 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 3 Sep 2021 15:09:10 +0000 (17:09 +0200)
commit9c629fa8340792cd30758b65f0593d93d7a383d7
tree9ea02bed5328e443ba13669b06c3ddf2c14af4c6
parent555dd1aaa6b654d0ad62da9660c32835ab493678
tests/qapi-schema: Hide OrderedDict in test output

Since commit 5d83b9a130 "qapi: replace if condition list with dict
{'all': [...]}", we represent if conditionals as trees consisting of
OrderedDict, list and str.  This results in less than legible test
output.  For instance:

    if OrderedDict([('not', OrderedDict([('any', [OrderedDict([('not', 'TEST_IF_EVT')]), OrderedDict([('not', 'TEST_IF_STRUCT')])])]))])

We intend to replace OrderedDict by dict when we get Python 3.7, which
will result in more legible output:

    if {'not': {'any': [{'not': 'TEST_IF_EVT'}, {'not': 'TEST_IF_STRUCT'}]}}

Can't wait: put in a hack to get that now, with a comment to revert it
when we replace OrderedDict.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210831123809.1107782-11-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
tests/qapi-schema/doc-good.out
tests/qapi-schema/qapi-schema-test.out
tests/qapi-schema/test-qapi.py