From 6e41ba82816a32b30e077b49cae55a01a1da9dc5 Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Thu, 4 Oct 2018 12:33:23 +0200 Subject: [PATCH] Publish fixtures in the appropiate file --- tests/fixtures.py | 2 ++ tests/test_api.py | 2 -- tests/test_html.py | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/fixtures.py b/tests/fixtures.py index e845efe..417eb63 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -1,9 +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') diff --git a/tests/test_api.py b/tests/test_api.py index 5d0bfdc..db9e41c 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -2,8 +2,6 @@ from .fixtures import app_client import pytest from urllib.parse import urlencode -pytest.fixture(scope='module')(app_client) - def test_homepage(app_client): _, response = app_client.get('/.json') assert response.status == 200 diff --git a/tests/test_html.py b/tests/test_html.py index a1ccaf3..bbeb3a7 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -1,7 +1,4 @@ from .fixtures import app_client -import pytest - -pytest.fixture(scope='module')(app_client) def test_homepage(app_client): response = app_client.get('/', gather_request=False) -- 2.39.5