mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Compare commits
5 commits
main
...
windows-gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57c294e9be | ||
|
|
5873276c43 | ||
|
|
b990abf1e0 | ||
|
|
518cb06baf | ||
|
|
79dff15050 |
3 changed files with 9 additions and 8 deletions
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
|
@ -4,10 +4,11 @@ on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
|
@ -26,5 +27,4 @@ jobs:
|
||||||
pip install -e '.[test]'
|
pip install -e '.[test]'
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
pytest -n auto -m "not serial"
|
pytest -vv
|
||||||
pytest -m "serial"
|
|
||||||
|
|
|
||||||
|
|
@ -674,12 +674,11 @@ class TableView(RowTableShared):
|
||||||
else:
|
else:
|
||||||
page_size = self.ds.page_size
|
page_size = self.ds.page_size
|
||||||
|
|
||||||
sql_no_limit = (
|
sql_no_order_no_limit = (
|
||||||
"select {select_all_columns} from {table_name} {where}{order_by}".format(
|
"select {select_all_columns} from {table_name} {where}".format(
|
||||||
select_all_columns=select_all_columns,
|
select_all_columns=select_all_columns,
|
||||||
table_name=escape_sqlite(table),
|
table_name=escape_sqlite(table),
|
||||||
where=where_clause,
|
where=where_clause,
|
||||||
order_by=order_by,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
sql = "select {select_specified_columns} from {table_name} {where}{order_by} limit {page_size}{offset}".format(
|
sql = "select {select_specified_columns} from {table_name} {where}{order_by} limit {page_size}{offset}".format(
|
||||||
|
|
@ -736,7 +735,7 @@ class TableView(RowTableShared):
|
||||||
self.ds,
|
self.ds,
|
||||||
request,
|
request,
|
||||||
database,
|
database,
|
||||||
sql=sql_no_limit,
|
sql=sql_no_order_no_limit,
|
||||||
params=params,
|
params=params,
|
||||||
table=table,
|
table=table,
|
||||||
metadata=table_metadata,
|
metadata=table_metadata,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,9 @@ def test_serve_localhost_https(ds_localhost_https_server):
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.serial
|
@pytest.mark.serial
|
||||||
@pytest.mark.skipif(not hasattr(socket, "AF_UNIX"), reason="Requires socket.AF_UNIX support")
|
@pytest.mark.skipif(
|
||||||
|
not hasattr(socket, "AF_UNIX"), reason="Requires socket.AF_UNIX support"
|
||||||
|
)
|
||||||
def test_serve_unix_domain_socket(ds_unix_domain_socket_server):
|
def test_serve_unix_domain_socket(ds_unix_domain_socket_server):
|
||||||
_, uds = ds_unix_domain_socket_server
|
_, uds = ds_unix_domain_socket_server
|
||||||
transport = httpx.HTTPTransport(uds=uds)
|
transport = httpx.HTTPTransport(uds=uds)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue