Skip to content

Commit 8ba80b8

Browse files
committed
Improve test to outsmart JIT
1 parent c087b0e commit 8ba80b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_capi/test_opt.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1441,10 +1441,10 @@ def test_narrow_type_to_constant_str_empty(self):
14411441
def f(n):
14421442
trace = []
14431443
for i in range(n):
1444-
empty = ""
1444+
dummy = "aaa"
14451445
# Hopefully the optimizer can't guess what the value is.
14461446
# f is always "", but we can only prove that it's a string:
1447-
f = empty + empty
1447+
f = dummy[:0]
14481448
trace.append("A")
14491449
if not f: # Kept.
14501450
trace.append("B")

0 commit comments

Comments
 (0)