From 44a199a0625b695492b2a8605030dc61191f39cb Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 13 Nov 2017 14:15:21 -0800 Subject: [PATCH] Stop using sqlite WITH RECURSIVE in our tests The version of Python 3 running in Travis CI doesn't support this. --- tests/test_app.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/test_app.py b/tests/test_app.py index cf803d47..39030c94 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -187,14 +187,6 @@ CREATE TABLE no_primary_key ( content text ); -WITH RECURSIVE - cnt(x) AS ( - SELECT 1 - UNION ALL - SELECT x+1 FROM cnt LIMIT 201 - ) - INSERT INTO no_primary_key SELECT * from cnt; - CREATE VIEW paginated_view AS SELECT content, @@ -218,4 +210,8 @@ INSERT INTO [table/with/slashes.csv] VALUES (3, 'hey'); CREATE VIEW simple_view AS SELECT content, upper(content) AS upper_content FROM simple_primary_key; -''' + +''' + '\n'.join([ + 'INSERT INTO no_primary_key VALUES ({});'.format(i + 1) + for i in range(201) +])