mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Allow "." in database filenames, closes #302
This commit is contained in:
parent
97ae66ccab
commit
120f20cd97
3 changed files with 15 additions and 4 deletions
|
|
@ -24,9 +24,9 @@ class TestClient:
|
|||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def app_client(sql_time_limit_ms=None, max_returned_rows=None, config=None):
|
||||
def app_client(sql_time_limit_ms=None, max_returned_rows=None, config=None, filename="fixtures.db"):
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
filepath = os.path.join(tmpdir, 'fixtures.db')
|
||||
filepath = os.path.join(tmpdir, filename)
|
||||
conn = sqlite3.connect(filepath)
|
||||
conn.executescript(TABLES)
|
||||
os.chdir(os.path.dirname(filepath))
|
||||
|
|
@ -78,6 +78,11 @@ def app_client_csv_max_mb_one():
|
|||
})
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def app_client_with_dot():
|
||||
yield from app_client(filename="fixtures.dot.db")
|
||||
|
||||
|
||||
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