kopia lustrzana https://github.com/simonw/datasette
Test `--load-extension` in GitHub Actions (#1792)
* Run the --load-extension test, refs #1789 * Ran cog, refs #1789pull/1793/head
rodzic
456dc155d4
commit
ba35105eee
|
@ -24,6 +24,9 @@ jobs:
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
|
- name: Build extension for --load-extension test
|
||||||
|
run: |-
|
||||||
|
(cd tests && gcc ext.c -fPIC -shared -o ext.so)
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install -e '.[test]'
|
pip install -e '.[test]'
|
||||||
|
|
|
@ -36,7 +36,7 @@ def test_homepage(app_client):
|
||||||
# 4 hidden FTS tables + no_primary_key (hidden in metadata)
|
# 4 hidden FTS tables + no_primary_key (hidden in metadata)
|
||||||
assert d["hidden_tables_count"] == 6
|
assert d["hidden_tables_count"] == 6
|
||||||
# 201 in no_primary_key, plus 6 in other hidden tables:
|
# 201 in no_primary_key, plus 6 in other hidden tables:
|
||||||
assert d["hidden_table_rows_sum"] == 207
|
assert d["hidden_table_rows_sum"] == 207, response.json
|
||||||
assert d["views_count"] == 4
|
assert d["views_count"] == 4
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ def test_database_page(app_client):
|
||||||
assert fragment in response.text
|
assert fragment in response.text
|
||||||
|
|
||||||
# And views
|
# And views
|
||||||
views_ul = soup.find("h2", text="Views").find_next_sibling("ul")
|
views_ul = soup.find("h2", string="Views").find_next_sibling("ul")
|
||||||
assert views_ul is not None
|
assert views_ul is not None
|
||||||
assert [
|
assert [
|
||||||
("/fixtures/paginated_view", "paginated_view"),
|
("/fixtures/paginated_view", "paginated_view"),
|
||||||
|
@ -128,7 +128,7 @@ def test_database_page(app_client):
|
||||||
] == sorted([(a["href"], a.text) for a in views_ul.find_all("a")])
|
] == sorted([(a["href"], a.text) for a in views_ul.find_all("a")])
|
||||||
|
|
||||||
# And a list of canned queries
|
# And a list of canned queries
|
||||||
queries_ul = soup.find("h2", text="Queries").find_next_sibling("ul")
|
queries_ul = soup.find("h2", string="Queries").find_next_sibling("ul")
|
||||||
assert queries_ul is not None
|
assert queries_ul is not None
|
||||||
assert [
|
assert [
|
||||||
("/fixtures/from_async_hook", "from_async_hook"),
|
("/fixtures/from_async_hook", "from_async_hook"),
|
||||||
|
|
Ładowanie…
Reference in New Issue