pytest_plugin: Instantiate only lister with no particular setup
This should fix the remaining blocking problems in the jenkins build failure report [1] [1] https://jenkins.softwareheritage.org/view/Debian%20packages/job/debian/job/packages/job/DLS/job/gbp-buildpackage/78/consoleFull
This commit is contained in:
parent
9437a643ad
commit
92422dcf75
2 changed files with 15 additions and 7 deletions
|
@ -7,7 +7,7 @@ import pytest
|
|||
|
||||
|
||||
from swh.lister.core.lister_base import ListerBase
|
||||
from swh.lister.cli import get_lister, SUPPORTED_LISTERS
|
||||
from swh.lister.cli import get_lister
|
||||
|
||||
from .test_utils import init_db
|
||||
|
||||
|
@ -20,14 +20,12 @@ def test_get_lister_wrong_input():
|
|||
assert "Invalid lister" in str(e.value)
|
||||
|
||||
|
||||
def test_get_lister(mock_get_scheduler):
|
||||
def test_get_lister(mock_get_scheduler, listers_to_instantiate):
|
||||
"""Instantiating a supported lister should be ok
|
||||
|
||||
"""
|
||||
db_url = init_db().url()
|
||||
# launchpad lister need particular setup so exclude from the checks
|
||||
listers_to_check = set(SUPPORTED_LISTERS) | {"launchpad"}
|
||||
for lister_name in listers_to_check:
|
||||
for lister_name in listers_to_instantiate:
|
||||
lst = get_lister(lister_name, db_url)
|
||||
assert isinstance(lst, ListerBase)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue