summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/scripts/python/unparse.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py
index f3e265a4b..423db1549 100755
--- a/tests/scripts/python/unparse.py
+++ b/tests/scripts/python/unparse.py
@@ -460,7 +460,14 @@ class UnparsePerl(UnparsePython):
"""Add an AST Return in output."""
self.fill('return')
if node.value:
- self.add(' ', node.value, ';')
+ self.add(
+ ' ',
+ (self.prefix,
+ '%' if isinstance(node.value, ast.Dict) else '$'),
+ node.value,
+ (self.prefix, None),
+ ';',
+ )
def _ast_str(self, node):
"""Add an AST Str in output."""