Permalink
Browse files

compile_options output in /-/versions, closes #396

  • Loading branch information...
simonw committed Jan 11, 2019
1 parent 5b02611 commit 8ce7866312f9b7c873541d6e3662ada3e850fa85
Showing with 15 additions and 1 deletion.
  1. +3 −0 datasette/app.py
  2. +11 −1 docs/introspection.rst
  3. +1 −0 tests/test_api.py
@@ -363,6 +363,9 @@ def versions(self):
"version": sqlite_version,
"fts_versions": fts_versions,
"extensions": sqlite_extensions,
"compile_options": [
r[0] for r in conn.execute("pragma compile_options;").fetchall()
],
},
}

@@ -61,7 +61,7 @@ This is an internal implementation detail of Datasette and the format should not
/-/versions
-----------

Shows the version of Datasette, Python and SQLite. `Versions example <https://fivethirtyeight.datasettes.com/-/versions>`_::
Shows the version of Datasette, Python and SQLite. `Versions example <https://latest.datasette.io/-/versions>`_::

{
"datasette": {
@@ -76,9 +76,19 @@ Shows the version of Datasette, Python and SQLite. `Versions example <https://fi
"json1": null
},
"fts_versions": [
"FTS5",
"FTS4",
"FTS3"
],
"compile_options": [
"COMPILER=gcc-6.3.0 20170516",
"ENABLE_FTS3",
"ENABLE_FTS4",
"ENABLE_FTS5",
"ENABLE_JSON1",
"ENABLE_RTREE",
"THREADSAFE=1"
],
"version": "3.16.2"
}
}
@@ -983,6 +983,7 @@ def test_versions_json(app_client):
assert 'sqlite' in response.json
assert 'version' in response.json['sqlite']
assert 'fts_versions' in response.json['sqlite']
assert 'compile_options' in response.json['sqlite']


def test_config_json(app_client):

0 comments on commit 8ce7866

Please sign in to comment.