{"html_url": "https://github.com/simonw/datasette/pull/1960#issuecomment-1355823260", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1960", "id": 1355823260, "node_id": "IC_kwDOBm6k_c5Q0Dic", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-16T23:36:07Z", "updated_at": "2022-12-16T23:36:07Z", "author_association": "OWNER", "body": "I ran `pytest --pdb -x` to drop into the debugger on the first failing test.\r\n\r\n```\r\n assert expected_rows == len(fetched)\r\n> assert expected_pages == count\r\nE assert 9 == 5\r\n```\r\nThat's in `test_paginate_tables_and_views()`.\r\n\r\nOn a hunch, I checked the current settings:\r\n\r\n```\r\n(Pdb) ds_client.ds._settings\r\n{'default_page_size': 50, 'max_returned_rows': 100, 'max_insert_rows': 100, 'num_sql_threads': 1, 'sql_time_limit_ms': 200, 'default_facet_size': 30, 'facet_time_limit_ms': 200, 'facet_suggest_time_limit_ms': 50, 'allow_facet': True, 'allow_download': True, 'allow_signed_tokens': True, 'max_signed_tokens_ttl': 0, 'suggest_facets': True, 'default_cache_ttl': 5, 'cache_size_kb': 0, 'allow_csv_stream': True, 'max_csv_mb': 100, 'truncate_cells_html': 2048, 'force_https_urls': False, 'template_debug': False, 'trace_debug': False, 'base_url': '/'}\r\n```\r\nLooks like something changed `default_page_size` to 50 and forgot to change it back!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1499150951, "label": "Port as many tests as possible to async def tests against ds_client"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1962#issuecomment-1355691595", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1962", "id": 1355691595, "node_id": "IC_kwDOBm6k_c5QzjZL", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-16T21:53:45Z", "updated_at": "2022-12-16T21:55:29Z", "author_association": "OWNER", "body": "Also need an alternative mechanism to this convenience for getting CSRF tokens before a POST:\r\n\r\nhttps://github.com/simonw/datasette/blob/5ee954e34b6eb762ccecbdb2be0791d0166fd19c/datasette/utils/testing.py#L90-L103\r\n\r\nOne option would be adding that mechanism to `datasette.client.post(...)` - as a `_csrf_from=` parameter (with an underscore because it's mainly intended for use in tests, though perhaps that's a weird convention that I shouldn't introduce).", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1500636982, "label": "Alternative, async-friendly pattern for `make_app_client()` and similar - fully retire `TestClient`"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1960#issuecomment-1355685828", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1960", "id": 1355685828, "node_id": "IC_kwDOBm6k_c5Qzh_E", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-16T21:50:01Z", "updated_at": "2022-12-16T21:50:01Z", "author_association": "OWNER", "body": "Looks like that `@pytest.mark.ds_client` mark I've been using isn't necessary - I added that so I could easily run `pytest -m ds_client` to execute all tests that I had ported to the new feature, but actually this achieves the same thing:\r\n\r\n pytest -k ds_client\r\n\r\nSo I'm going to remove the mark.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1499150951, "label": "Port as many tests as possible to async def tests against ds_client"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1960#issuecomment-1355478743", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1960", "id": 1355478743, "node_id": "IC_kwDOBm6k_c5QyvbX", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-16T19:27:12Z", "updated_at": "2022-12-16T19:27:12Z", "author_association": "OWNER", "body": "Bad news: they're definitely caused by tests that are subtly affected by other tests.\r\n\r\nThis passes without errors:\r\n\r\n pytest -k test_paginate_tables_and_views", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1499150951, "label": "Port as many tests as possible to async def tests against ds_client"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1960#issuecomment-1355475671", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1960", "id": 1355475671, "node_id": "IC_kwDOBm6k_c5QyurX", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-12-16T19:26:08Z", "updated_at": "2022-12-16T19:26:08Z", "author_association": "OWNER", "body": "Great news! The test failures I got running on my laptop (with that fresh Ubuntu Docker image) look like they match the failures I saw in CI:\r\n\r\n```\r\n======== short test summary info ========\r\nFAILED tests/test_table_api.py::test_paginate_tables_and_views[/fixtures/paginated_view.json-201-9] - assert 9 == 5\r\nFAILED tests/test_table_api.py::test_sortable_columns_metadata - KeyError: 'error'\r\nFAILED tests/test_table_api.py::test_searchable_views[/fixtures/searchable_view_configured_by_metadata.json?_search=weasel-expected_rows0] - AssertionError: assert [[2, 'terry d...sel', 'puma']] == [[1, 'barry c...sel', 'puma']]\r\nFAILED tests/test_table_api.py::test_unit_filters - KeyError: 'distance'\r\nFAILED tests/test_table_api.py::test_custom_query_with_unicode_characters - AssertionError: assert {'error': 'Ta...'title': None} == [{'id': 1, 'n...n Francisco'}]\r\nFAILED tests/test_table_html.py::test_sort_links - AssertionError: assert [{'a_href': N...', ...}}, ...] == [{'a_href': N...', ...}}, ...]\r\nFAILED tests/test_table_html.py::test_table_html_no_primary_key - AttributeError: 'NoneType' object has no attribute 'strip'\r\nFAILED tests/test_table_html.py::test_table_html_foreign_key_custom_label_column - assert [['