|
16 | 16 | import pytest |
17 | 17 |
|
18 | 18 | import llsd |
19 | | -from llsd.base import PY2, is_integer, is_string, is_unicode |
| 19 | +from llsd.base import PY2, is_integer, is_string, is_unicode, MAX_FORMAT_DEPTH, MAX_PARSE_DEPTH |
20 | 20 | from llsd.serde_xml import remove_invalid_xml_bytes |
21 | 21 | from tests.fuzz import LLSDFuzzer |
22 | 22 |
|
@@ -533,7 +533,7 @@ def testDeepMap(self): |
533 | 533 | """ |
534 | 534 |
|
535 | 535 | test_map = {"foo":"bar", "depth":0} |
536 | | - max_depth = 199 |
| 536 | + max_depth = MAX_FORMAT_DEPTH - 1 |
537 | 537 | for depth in range(max_depth): |
538 | 538 | test_map = {"foo":"bar", "depth":depth, "next":test_map} |
539 | 539 |
|
@@ -990,7 +990,7 @@ def testDeepMap(self): |
990 | 990 | """ |
991 | 991 |
|
992 | 992 | test_map = {"foo":"bar", "depth":0} |
993 | | - max_depth = 199 |
| 993 | + max_depth = MAX_FORMAT_DEPTH -1 |
994 | 994 | for depth in range(max_depth): |
995 | 995 | test_map = {"foo":"bar", "depth":depth, "next":test_map} |
996 | 996 |
|
@@ -1525,7 +1525,7 @@ def testDeepMap(self): |
1525 | 1525 | """ |
1526 | 1526 |
|
1527 | 1527 | test_map = {"foo":"bar", "depth":0} |
1528 | | - max_depth = 199 |
| 1528 | + max_depth = MAX_FORMAT_DEPTH - 1 |
1529 | 1529 | for depth in range(max_depth): |
1530 | 1530 | test_map = {"foo":"bar", "depth":depth, "next":test_map} |
1531 | 1531 |
|
|
0 commit comments