summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-04-07 11:17:44 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-04-07 11:26:56 +0200
commit3d9459c01f9d634818ae72ddd44ea2d9b8bf5b70 (patch)
treec45106b351be5eea7d5dfd29d912eddda3fa75a2
parent59b0443133341b9fdb23909fecf9ed2d96904041 (diff)
downloadcython-3d9459c01f9d634818ae72ddd44ea2d9b8bf5b70.tar.gz
Merge some runtime compilation runs into a single one in the CPython fstring test to reduce the overall runtime of the test.
-rw-r--r--tests/run/test_fstring.pyx8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/run/test_fstring.pyx b/tests/run/test_fstring.pyx
index 5bcf9c0b6..b8e93673a 100644
--- a/tests/run/test_fstring.pyx
+++ b/tests/run/test_fstring.pyx
@@ -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