From 5bda4a477c52b6d1cd7d0ca25382dbb20bda40ea Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 15 Jun 2018 00:01:48 -0700 Subject: [PATCH] Fixed CSV tests - Python 3.6.5 and 3.6.3 apparently differ The test used to expect CSV to come back like this: hello world "" With the final blank value encoded in quotes. Judging by Travis failures, this behaviour changed between Python 3.6.3 and 3.6.5: https://travis-ci.org/simonw/datasette/jobs/392586661 --- tests/test_csv.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_csv.py b/tests/test_csv.py index b6e2269f..d2475f67 100644 --- a/tests/test_csv.py +++ b/tests/test_csv.py @@ -9,7 +9,6 @@ EXPECTED_TABLE_CSV = '''id,content EXPECTED_CUSTOM_CSV = '''content hello world -"" '''.replace('\n', '\r\n') @@ -22,7 +21,7 @@ def test_table_csv(app_client): def test_custom_sql_csv(app_client): response = app_client.get( - '/test_tables.csv?sql=select+content+from+simple_primary_key' + '/test_tables.csv?sql=select+content+from+simple_primary_key+limit+2' ) assert response.status == 200 assert 'text/plain; charset=utf-8' == response.headers['Content-Type']