Skip to content

Commit 58884ab

Browse files
committed
Improve un-proveable empty string in JIT test
1 parent 601392d commit 58884ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_capi/test_opt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,10 +1503,10 @@ def test_narrow_type_to_constant_str_empty(self):
15031503
def f(n):
15041504
trace = []
15051505
for i in range(n):
1506-
dummy = "aaa"
15071506
# Hopefully the optimizer can't guess what the value is.
15081507
# empty is always "", but we can only prove that it's a string:
1509-
empty = dummy[:0]
1508+
false = i == TIER2_THRESHOLD
1509+
empty = "X"[:false]
15101510
trace.append("A")
15111511
if not empty: # Kept.
15121512
trace.append("B")

0 commit comments

Comments
 (0)