@@ -1490,7 +1490,7 @@ def f():
1490
1490
1491
1491
self .assertNotIn ("somethingverywronghehe" , err .getvalue ())
1492
1492
1493
- def test_name_error_suggestions_do_not_trigger_for_big_dicts (self ):
1493
+ def test_name_error_suggestions_do_not_trigger_for_too_many_locals (self ):
1494
1494
def f ():
1495
1495
# Mutating locals() is unreliable, so we need to do it by hand
1496
1496
a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = a10 = a11 = a12 = a13 = \
@@ -1501,7 +1501,13 @@ def f():
1501
1501
a62 = a63 = a64 = a65 = a66 = a67 = a68 = a69 = a70 = a71 = a72 = a73 = \
1502
1502
a74 = a75 = a76 = a77 = a78 = a79 = a80 = a81 = a82 = a83 = a84 = a85 = \
1503
1503
a86 = a87 = a88 = a89 = a90 = a91 = a92 = a93 = a94 = a95 = a96 = a97 = \
1504
- a98 = a99 = a100 = a101 = a102 = a103 = None
1504
+ a98 = a99 = a100 = a101 = a102 = a103 = a104 = a105 = a106 = a107 = \
1505
+ a108 = a109 = a110 = a111 = a112 = a113 = a114 = a115 = a116 = a117 = \
1506
+ a118 = a119 = a120 = a121 = a122 = a123 = a124 = a125 = a126 = \
1507
+ a127 = a128 = a129 = a130 = a131 = a132 = a133 = a134 = a135 = a136 = \
1508
+ a137 = a138 = a139 = a140 = a141 = a142 = a143 = a144 = a145 = \
1509
+ a146 = a147 = a148 = a149 = a150 = a151 = a152 = a153 = a154 = a155 = \
1510
+ a156 = a157 = a158 = a159 = a160 = a161 = None
1505
1511
print (a0 )
1506
1512
1507
1513
try :
@@ -1510,7 +1516,7 @@ def f():
1510
1516
with support .captured_stderr () as err :
1511
1517
sys .__excepthook__ (* sys .exc_info ())
1512
1518
1513
- self .assertNotIn ("a10 " , err .getvalue ())
1519
+ self .assertNotIn ("a1 " , err .getvalue ())
1514
1520
1515
1521
def test_name_error_with_custom_exceptions (self ):
1516
1522
def f ():
@@ -1643,7 +1649,7 @@ class A:
1643
1649
blech = None
1644
1650
# A class with a very big __dict__ will not be consider
1645
1651
# for suggestions.
1646
- for index in range (101 ):
1652
+ for index in range (160 ):
1647
1653
setattr (A , f"index_{ index } " , None )
1648
1654
1649
1655
try :
0 commit comments