Test --load-extension in GitHub Actions (#1792)

* Run the --load-extension test, refs #1789
* Ran cog, refs #1789
This commit is contained in:
Simon Willison 2022-08-23 17:11:45 -07:00 committed by GitHub
commit ba35105eee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -24,6 +24,9 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Build extension for --load-extension test
run: |-
(cd tests && gcc ext.c -fPIC -shared -o ext.so)
- name: Install dependencies
run: |
pip install -e '.[test]'

View file

@ -36,7 +36,7 @@ def test_homepage(app_client):
# 4 hidden FTS tables + no_primary_key (hidden in metadata)
assert d["hidden_tables_count"] == 6
# 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

View file

@ -115,7 +115,7 @@ def test_database_page(app_client):
assert fragment in response.text
# 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 [
("/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")])
# 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 [
("/fixtures/from_async_hook", "from_async_hook"),