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

* Run the --load-extension test, refs #1789
* Ran cog, refs #1789
pull/1793/head
Simon Willison 2022-08-23 17:11:45 -07:00 zatwierdzone przez GitHub
rodzic 456dc155d4
commit ba35105eee
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -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]'

Wyświetl plik

@ -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

Wyświetl plik

@ -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"),