aboutsummaryrefslogtreecommitdiff
path: root/tests/qapi-schema/test-qapi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qapi-schema/test-qapi.py')
-rwxr-xr-xtests/qapi-schema/test-qapi.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py
index 7e3f9f4..4be9302 100755
--- a/tests/qapi-schema/test-qapi.py
+++ b/tests/qapi-schema/test-qapi.py
@@ -96,17 +96,8 @@ class QAPISchemaTestVisitor(QAPISchemaVisitor):
@staticmethod
def _print_if(ifcond, indent=4):
- # TODO Drop this hack after replacing OrderedDict by plain
- # dict (requires Python 3.7)
- def _massage(subcond):
- if isinstance(subcond, str):
- return subcond
- if isinstance(subcond, list):
- return [_massage(val) for val in subcond]
- return {key: _massage(val) for key, val in subcond.items()}
-
if ifcond.is_present():
- print('%sif %s' % (' ' * indent, _massage(ifcond.ifcond)))
+ print('%sif %s' % (' ' * indent, ifcond.ifcond))
@classmethod
def _print_features(cls, features, indent=4):
@@ -131,7 +122,7 @@ def test_frontend(fname):
for feat, section in doc.features.items():
print(' feature=%s\n%s' % (feat, section.text))
for section in doc.sections:
- print(' section=%s\n%s' % (section.tag, section.text))
+ print(' section=%s\n%s' % (section.kind, section.text))
def open_test_result(dir_name, file_name, update):