Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve un-proveable empty string in JIT test
  • Loading branch information
fluhus committed Mar 3, 2025
commit 58884ab4e9066b3e4a2cc168c1c7ee4b8bec1f0c
4 changes: 2 additions & 2 deletions Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1503,10 +1503,10 @@ def test_narrow_type_to_constant_str_empty(self):
def f(n):
trace = []
for i in range(n):
dummy = "aaa"
# Hopefully the optimizer can't guess what the value is.
# empty is always "", but we can only prove that it's a string:
empty = dummy[:0]
false = i == TIER2_THRESHOLD
empty = "X"[:false]
trace.append("A")
if not empty: # Kept.
trace.append("B")
Expand Down
Loading