Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/conda/tests/test_lister.py
- This file was added.
# Copyright (C) 2022 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.conda.lister import CondaLister | |||||
def test_conda_lister_free_channel(datadir, requests_mock_datadir, swh_scheduler): | |||||
lister = CondaLister( | |||||
scheduler=swh_scheduler, channel="free", archs=["linux-64", "osx-64", "win-64"] | |||||
) | |||||
res = lister.run() | |||||
assert res.pages == 3 | |||||
assert res.origins == 14 | |||||
def test_conda_lister_msys2_channel(datadir, requests_mock_datadir, swh_scheduler): | |||||
lister = CondaLister( | |||||
scheduler=swh_scheduler, channel="msys2", archs=["win-64", "win-32"] | |||||
) | |||||
res = lister.run() | |||||
assert res.pages == 2 | |||||
assert res.origins == 10 | |||||
def test_conda_lister_conda_forge_channel( | |||||
datadir, requests_mock_datadir, swh_scheduler | |||||
): | |||||
lister = CondaLister( | |||||
scheduler=swh_scheduler, | |||||
url="https://conda.anaconda.org", | |||||
channel="conda-forge", | |||||
archs=["linux-64"], | |||||
) | |||||
res = lister.run() | |||||
assert res.pages == 1 | |||||
assert res.origins == 6 |