File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 6
6
import datetime
7
7
from decimal import Decimal as D
8
8
from pathlib import Path
9
+ import
9F25
span> sys
9
10
import tempfile
10
11
import unittest
11
12
@@ -91,11 +92,13 @@ def test_deepcopy(self):
91
92
self .assertEqual (obj_copy , expected_obj )
92
93
93
94
def test_inline_array_recursion_limit (self ):
94
- nest_count = 470
95
+ # 470 with default recursion limit
96
+ nest_count = int (sys .getrecursionlimit () * 0.47 )
95
97
recursive_array_toml = "arr = " + nest_count * "[" + nest_count * "]"
96
98
tomllib .loads (recursive_array_toml )
97
99
98
100
def test_inline_table_recursion_limit (self ):
99
- nest_count = 310
101
+ # 310 with default recursion limit
102
+ nest_count = int (sys .getrecursionlimit () * 0.31 )
100
103
recursive_table_toml = nest_count * "key = {" + nest_count * "}"
101
104
tomllib .loads (recursive_table_toml )
You can’t perform that action at this time.
0 commit comments