mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Longer time limit for test_paginate_compound_keys
It was failing intermittently in Travis - see #209
This commit is contained in:
parent
d1d7a3dfc5
commit
aa2abad917
2 changed files with 10 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ import tempfile
|
|||
import time
|
||||
|
||||
|
||||
def app_client():
|
||||
def app_client(sql_time_limit_ms=None):
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
filepath = os.path.join(tmpdir, 'test_tables.db')
|
||||
conn = sqlite3.connect(filepath)
|
||||
|
|
@ -22,7 +22,7 @@ def app_client():
|
|||
[filepath],
|
||||
page_size=50,
|
||||
max_returned_rows=100,
|
||||
sql_time_limit_ms=20,
|
||||
sql_time_limit_ms=sql_time_limit_ms or 20,
|
||||
metadata=METADATA,
|
||||
plugins_dir=plugins_dir,
|
||||
)
|
||||
|
|
@ -32,6 +32,10 @@ def app_client():
|
|||
yield ds.app().test_client
|
||||
|
||||
|
||||
def app_client_longer_time_limit():
|
||||
yield from app_client(200)
|
||||
|
||||
|
||||
def generate_compound_rows(num):
|
||||
for a, b, c in itertools.islice(
|
||||
itertools.product(string.ascii_lowercase, repeat=3), num
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue