datadir = '/var/lib/jenkins/workspace/DLS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/lister/cran/tests/data'
swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7f6f348c0c88>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f6f356a4e48>
def test_cran_lister_cran(datadir, swh_scheduler, mocker):
with open(path.join(datadir, "list-r-packages.json")) as f:
cran_data = json.loads(f.read())
lister = CRANLister(swh_scheduler)
mock_cran = mocker.patch("swh.lister.cran.lister.read_cran_data")
mock_cran.return_value = cran_data
> stats = lister.run()
.tox/py3/lib/python3.7/site-packages/swh/lister/cran/tests/test_lister.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/lister/pattern.py:124: in run
full_stats.origins += self.send_origins(origins)
.tox/py3/lib/python3.7/site-packages/swh/lister/pattern.py:226: in send_origins
for batch_origins in grouper(origins, n=1000):
.tox/py3/lib/python3.7/site-packages/swh/core/utils.py:47: in grouper
for _data in itertools.zip_longest(*args, fillvalue=stop_value):
.tox/py3/lib/python3.7/site-packages/swh/lister/cran/lister.py:65: in get_origins_from_page
last_update=parse_packaged_date(package_info),
.tox/py3/lib/python3.7/site-packages/swh/lister/cran/lister.py:118: in parse_packaged_date
locale.setlocale(locale.LC_TIME, "en_US")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
category = 2, locale = 'en_US'
def setlocale(category, locale=None):
""" Set the locale for the given category. The locale can be
a string, an iterable of two strings (language code and encoding),
or None.
Iterables are converted to strings using the locale aliasing
engine. Locale strings are passed directly to the C lib.
category may be given as one of the LC_* values.
"""
if locale and not isinstance(locale, _builtin_str):
# convert to string
locale = normalize(_build_localename(locale))
> return _setlocale(category, locale)
E locale.Error: unsupported locale setting
/usr/lib/python3.7/locale.py:604: Error
TEST RESULT
TEST RESULT
- Run At
- Feb 5 2021, 1:00 PM