pytest: Define plugin and declare it in the root conftest
Then drop all unneeded and indirect imports
This commit is contained in:
parent
e99d3464e4
commit
9437a643ad
16 changed files with 9 additions and 39 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
from swh.lister.core.tests.conftest import * # noqa
|
|
@ -1 +0,0 @@
|
|||
from swh.lister.core.tests.conftest import * # noqa
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
import pytest
|
||||
|
||||
from swh.lister.core.tests.conftest import * # noqa
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def lister_cran(swh_listers):
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||
from swh.lister.core.tests.conftest import * # noqa
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue