We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0931046 commit 8245728Copy full SHA for 8245728
tests/llsd_test.py
@@ -1345,6 +1345,20 @@ def testMap(self):
1345
map_within_map_xml)
1346
self.assertXMLRoundtrip({}, blank_map_xml)
1347
1348
+ def testDeepMap(self):
1349
+ """
1350
+ Test that formatting a deeply nested map does not cause a RecursionError
1351
1352
+
1353
+ test_map = {"foo":"bar", "depth":0, "next":None}
1354
+ max_depth = 200
1355
+ for depth in range(max_depth):
1356
+ test_map = {"foo":"bar", "depth":depth, "next":test_map}
1357
1358
+ # this should not throw an exception.
1359
+ test_xml = self.llsd.as_xml(test_map)
1360
1361
1362
def testBinary(self):
1363
"""
1364
Test the parse and serialization of input type : binary.
0 commit comments