kopia lustrzana https://github.com/simonw/datasette
Use scope='session' for all fixtures
This means they will only be executed once which makes sense since the database they create is immutable.custom-router
rodzic
76d11eb768
commit
a4d6acc239
|
@ -9,9 +9,9 @@ from .fixtures import (
|
|||
import pytest
|
||||
import urllib
|
||||
|
||||
pytest.fixture(scope='module')(app_client)
|
||||
pytest.fixture(scope='module')(app_client_shorter_time_limit)
|
||||
pytest.fixture(scope='module')(app_client_returend_rows_matches_page_size)
|
||||
pytest.fixture(scope='session')(app_client)
|
||||
pytest.fixture(scope='session')(app_client_shorter_time_limit)
|
||||
pytest.fixture(scope='session')(app_client_returend_rows_matches_page_size)
|
||||
|
||||
|
||||
def test_homepage(app_client):
|
||||
|
|
|
@ -4,7 +4,7 @@ import pytest
|
|||
import re
|
||||
import urllib.parse
|
||||
|
||||
pytest.fixture(scope='module')(app_client)
|
||||
pytest.fixture(scope='session')(app_client)
|
||||
|
||||
|
||||
def test_homepage(app_client):
|
||||
|
|
|
@ -35,7 +35,7 @@ CREATE TABLE "office" (
|
|||
'''
|
||||
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
@pytest.fixture(scope='session')
|
||||
def ds_instance():
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
filepath = os.path.join(tmpdir, 'test_tables.db')
|
||||
|
|
Ładowanie…
Reference in New Issue