Compare commits

...

5 commits

Author SHA1 Message Date
Simon Willison
57c294e9be Big performance boost for faceting, closes #1394 2021-07-14 17:05:18 -07:00
Simon Willison
5873276c43 Run tests with -vv, refs #511 2021-07-11 12:40:23 -07:00
Simon Willison
b990abf1e0 Stop using pytest-xdist to see if that helps on Windows, refs #511 2021-07-10 18:33:17 -07:00
Simon Willison
518cb06baf Ran Black, refs #1388 2021-07-10 16:47:08 -07:00
Simon Willison
79dff15050 Run tests on Windows too, refs #511 2021-07-10 16:44:47 -07:00
3 changed files with 9 additions and 8 deletions

View file

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

View file

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

View file

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