diff --git a/test/helpers.py b/test/helpers.py index b145213..1b9f22f 100644 --- a/test/helpers.py +++ b/test/helpers.py @@ -43,7 +43,7 @@ def namespace_name(node): for name in sorted(namespace.nonlocal_names): s += indent + ' - nonlocal ' + name + '\n' - for binding in sorted(namespace.bindings, key=lambda b: b.name): + for binding in sorted(namespace.bindings, key=lambda b: b.name or str(b.value)): s += indent + ' - ' + repr(binding) + '\n' for child in iter_child_namespaces(namespace):