pytest: Define plugin and declare it in the root conftest

Then drop all unneeded and indirect imports
This commit is contained in:
Antoine R. Dumont (@ardumont) 2020-09-01 17:43:01 +02:00
parent e99d3464e4
commit 9437a643ad
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
16 changed files with 9 additions and 39 deletions

View file

@ -2,6 +2,7 @@ include Makefile
include README
include requirements*.txt
include version.txt
include conftest.py
include swh/lister/cran/list_all_packages.R
recursive-include swh/lister/*/tests/data/ *
recursive-include swh py.typed

View file

@ -7,7 +7,7 @@ import os
import pytest
pytest_plugins = ["swh.scheduler.pytest_plugin"]
pytest_plugins = ["swh.scheduler.pytest_plugin", "swh.lister.pytest_plugin"]
os.environ["LC_ALL"] = "C.UTF-8"

View file

@ -1 +0,0 @@
from swh.lister.core.tests.conftest import * # noqa

View file

@ -1 +0,0 @@
from swh.lister.core.tests.conftest import * # noqa

View file

@ -5,8 +5,6 @@
import pytest
from swh.lister.core.tests.conftest import * # noqa
@pytest.fixture
def lister_cran(swh_listers):

View file

@ -1,4 +1,4 @@
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@ -9,7 +9,6 @@ from pytest_postgresql.janitor import DatabaseJanitor
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from swh.lister.core.tests.conftest import * # noqa
from swh.lister.core.models import SQLBase
from swh.lister.debian import debian_init

View file

@ -1,6 +0,0 @@
# Copyright (C) 2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.lister.core.tests.conftest import * # noqa

View file

@ -1 +0,0 @@
from swh.lister.core.tests.conftest import * # noqa

View file

@ -1,6 +0,0 @@
# Copyright (C) 2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.lister.core.tests.conftest import * # noqa

View file

@ -1,6 +0,0 @@
# Copyright (C) 2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.lister.core.tests.conftest import * # noqa

View file

@ -3,7 +3,6 @@
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from swh.lister.core.tests.conftest import * # noqa
from datetime import datetime
import json
import os

View file

@ -1,12 +1,10 @@
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import pytest
from swh.lister.core.tests.conftest import * # noqa
@pytest.fixture
def lister_npm(swh_listers):

View file

@ -1,12 +1,10 @@
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import pytest
from swh.lister.core.tests.conftest import * # noqa
@pytest.fixture
def lister_packagist(swh_listers):

View file

@ -1,12 +1,10 @@
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import pytest
from swh.lister.core.tests.conftest import * # noqa
@pytest.fixture
def lister_phabricator(swh_listers):

View file

@ -1,12 +1,10 @@
# Copyright (C) 2019 The Software Heritage developers
# Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
import pytest
from swh.lister.core.tests.conftest import * # noqa
@pytest.fixture
def lister_pypi(swh_listers):

View file

@ -4,6 +4,7 @@
# See top-level LICENSE file for more information
import logging
import pytest
from sqlalchemy import create_engine
@ -11,6 +12,7 @@ from sqlalchemy import create_engine
from swh.lister import get_lister, SUPPORTED_LISTERS
from swh.lister.core.models import initialize
logger = logging.getLogger(__name__)