issue_comments
5 rows where issue = 625980317 and "updated_at" is on date 2020-05-27 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Unit test that checks that all plugin hooks have corresponding unit tests · 5 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
634916313 | https://github.com/simonw/datasette/issues/771#issuecomment-634916313 | https://api.github.com/repos/simonw/datasette/issues/771 | MDEyOklzc3VlQ29tbWVudDYzNDkxNjMxMw== | simonw 9599 | 2020-05-27T20:17:13Z | 2020-05-27T20:17:13Z | OWNER | Closed in da87e963bff24e47878a5bc2025c8bfc63d4bc93 |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Unit test that checks that all plugin hooks have corresponding unit tests 625980317 | |
634915104 | https://github.com/simonw/datasette/issues/771#issuecomment-634915104 | https://api.github.com/repos/simonw/datasette/issues/771 | MDEyOklzc3VlQ29tbWVudDYzNDkxNTEwNA== | simonw 9599 | 2020-05-27T20:14:32Z | 2020-05-27T20:14:32Z | OWNER | ``` $ pytest -k test_plugin_hooks_have_tests -vv ====================================== test session starts ====================================== platform darwin -- Python 3.7.7, pytest-5.2.4, py-1.8.1, pluggy-0.13.1 -- /Users/simon/.local/share/virtualenvs/datasette-AWNrQs95/bin/python cachedir: .pytest_cache rootdir: /Users/simon/Dropbox/Development/datasette, inifile: pytest.ini plugins: asyncio-0.10.0 collected 486 items / 475 deselected / 11 selected tests/test_plugins.py::test_plugin_hooks_have_tests[asgi_wrapper] XPASS [ 9%] tests/test_plugins.py::test_plugin_hooks_have_tests[extra_body_script] XPASS [ 18%] tests/test_plugins.py::test_plugin_hooks_have_tests[extra_css_urls] XPASS [ 27%] tests/test_plugins.py::test_plugin_hooks_have_tests[extra_js_urls] XPASS [ 36%] tests/test_plugins.py::test_plugin_hooks_have_tests[extra_template_vars] XPASS [ 45%] tests/test_plugins.py::test_plugin_hooks_have_tests[prepare_connection] XPASS [ 54%] tests/test_plugins.py::test_plugin_hooks_have_tests[prepare_jinja2_environment] XFAIL [ 63%] tests/test_plugins.py::test_plugin_hooks_have_tests[publish_subcommand] XFAIL [ 72%] tests/test_plugins.py::test_plugin_hooks_have_tests[register_facet_classes] XFAIL [ 81%] tests/test_plugins.py::test_plugin_hooks_have_tests[register_output_renderer] XFAIL [ 90%] tests/test_plugins.py::test_plugin_hooks_have_tests[render_cell] XPASS [100%] ========================= 475 deselected, 4 xfailed, 7 xpassed in 1.70s ========================= |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Unit test that checks that all plugin hooks have corresponding unit tests 625980317 | |
634909818 | https://github.com/simonw/datasette/issues/771#issuecomment-634909818 | https://api.github.com/repos/simonw/datasette/issues/771 | MDEyOklzc3VlQ29tbWVudDYzNDkwOTgxOA== | simonw 9599 | 2020-05-27T20:02:52Z | 2020-05-27T20:02:52Z | OWNER | Actually I'll land this using |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Unit test that checks that all plugin hooks have corresponding unit tests 625980317 | |
634909347 | https://github.com/simonw/datasette/issues/771#issuecomment-634909347 | https://api.github.com/repos/simonw/datasette/issues/771 | MDEyOklzc3VlQ29tbWVudDYzNDkwOTM0Nw== | simonw 9599 | 2020-05-27T20:01:52Z | 2020-05-27T20:01:52Z | OWNER | I'll do the work for this in the pull request #772. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Unit test that checks that all plugin hooks have corresponding unit tests 625980317 | |
634900776 | https://github.com/simonw/datasette/issues/771#issuecomment-634900776 | https://api.github.com/repos/simonw/datasette/issues/771 | MDEyOklzc3VlQ29tbWVudDYzNDkwMDc3Ng== | simonw 9599 | 2020-05-27T19:44:25Z | 2020-05-27T19:44:25Z | OWNER | This seems to work: ```diff diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 8b6a6b4..e9a40aa 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -7,7 +7,7 @@ from .fixtures import ( TestClient as _TestClient, ) # noqa from datasette.app import Datasette -from datasette.plugins import get_plugins, DEFAULT_PLUGINS +from datasette.plugins import get_plugins, DEFAULT_PLUGINS, pm from datasette.utils import sqlite3 import base64 import json @@ -20,6 +20,21 @@ import pytest import urllib +def test_plugin_hooks_have_tests(): + "Every plugin hook should be referenced in this test module" + hooks = [name for name in dir(pm.hook) if not name.startswith("")] + tests_in_this_module = [t for t in globals().keys() if t.startswith('test')] + untested = [] + for hook in hooks: + ok = False + for test in tests_in_this_module: + if hook in test: + ok = True + if not ok: + untested.append(hook) + assert not untested, 'These plugin hooks are missing tests: {}'.format(untested) + + def test_plugins_dir_plugin_prepare_connection(app_client): response = app_client.get( "/fixtures.json?sql=select+convert_units(100%2C+'m'%2C+'ft')" ``` Based on how the documentation unit tests work. Currently fails with:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Unit test that checks that all plugin hooks have corresponding unit tests 625980317 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [issue] INTEGER REFERENCES [issues]([id]) , [performed_via_github_app] TEXT); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 1