Skip to content

Commit 23695d6

Browse files
committed
Improve test to outsmart JIT
1 parent 80c1c6c commit 23695d6

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-
empty = ""
1506+
dummy = "aaa"
15071507
# Hopefully the optimizer can't guess what the value is.
15081508
# f is always "", but we can only prove that it's a string:
1509-
f = empty + empty
1509+
f = dummy[:0]
15101510
trace.append("A")
15111511
if not f: # Kept.
15121512
trace.append("B")

0 commit comments

Comments
 (0)