X-Git-Url: https://git.jsancho.org/?p=datasette-pytables.git;a=blobdiff_plain;f=tests%2Ffixtures.py;h=417eb630e723a51cbfa7f8c5567ad9298071e6e2;hp=bbca1186aefebe2c86704801d373a5b5d2aada96;hb=6e41ba82816a32b30e077b49cae55a01a1da9dc5;hpb=d411de8cb97045c9b7e51dec6182a89edef2701d diff --git a/tests/fixtures.py b/tests/fixtures.py index bbca118..417eb63 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -1,8 +1,11 @@ from datasette.app import Datasette +import numpy as np import os +import pytest from tables import * import tempfile +@pytest.fixture(scope='session') def app_client(max_returned_rows=None): with tempfile.TemporaryDirectory() as tmpdir: filepath = os.path.join(tmpdir, 'test_tables.h5') @@ -37,6 +40,8 @@ def populate_file(filepath): array2 = h5file.create_array(group1, 'array2', [x for x in range(10000)]) + multiarray = h5file.create_array(group2, 'multi', np.arange(1000).reshape(10, 50, 2)) + for table in (table1, table2): row = table.row