Commit 3d9459c0 authored by Stefan Behnel's avatar Stefan Behnel

Merge some runtime compilation runs into a single one in the CPython fstring...

Merge some runtime compilation runs into a single one in the CPython fstring test to reduce the overall runtime of the test.
parent 59b04431
......@@ -255,8 +255,12 @@ f'{a * x()}'"""
width = 1
# Test around 256.
for i in range(250, 260):
self.assertEqual(cy_eval(build_fstr(i), x=x, width=width), (x+' ')*i)
# for i in range(250, 260):
# self.assertEqual(cy_eval(build_fstr(i), x=x, width=width), (x+' ')*i)
self.assertEqual(
cy_eval('[' + ', '.join(build_fstr(i) for i in range(250, 260)) + ']', x=x, width=width),
[(x+' ')*i for i in range(250, 260)],
)
# Test concatenating 2 largs fstrings.
self.assertEqual(cy_eval(build_fstr(255)*3, x=x, width=width), (x+' ')*(255*3)) # CPython uses 255*256
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment