datadir = '/var/lib/jenkins/workspace/DLS/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/lister/arch/tests/data'
requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7f41ec63bc18>
swh_scheduler = <swh.scheduler.backend.SchedulerBackend object at 0x7f41ec59e5f8>
def test_arch_lister(datadir, requests_mock_datadir, swh_scheduler):
lister = ArchLister(scheduler=swh_scheduler)
> res = lister.run()
.tox/py3/lib/python3.7/site-packages/swh/lister/arch/tests/test_lister.py:1061:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/lister/pattern.py:127: in run
for page in self.get_pages():
.tox/py3/lib/python3.7/site-packages/swh/lister/arch/lister.py:352: in get_pages
url=archive_url, destination_path=destination_path
.tox/py3/lib/python3.7/site-packages/swh/lister/arch/lister.py:243: in get_repo_archive
tar = tarfile.open(destination_path)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class 'tarfile.TarFile'>
name = PosixPath('/tmp/archlinux_archive/armv7h/core.files.tar.gz'), mode = 'r'
fileobj = None, bufsize = 10240, kwargs = {}
not_compressed = <function TarFile.open.<locals>.not_compressed at 0x7f41ec27c7b8>
comptype = 'tar'
func = <bound method TarFile.taropen of <class 'tarfile.TarFile'>>
@classmethod
def open(cls, name=None, mode="r", fileobj=None, bufsize=RECORDSIZE, **kwargs):
"""Open a tar archive for reading, writing or appending. Return
an appropriate TarFile class.
mode:
'r' or 'r:*' open for reading with transparent compression
'r:' open for reading exclusively uncompressed
'r:gz' open for reading with gzip compression
'r:bz2' open for reading with bzip2 compression
'r:xz' open for reading with lzma compression
'a' or 'a:' open for appending, creating the file if necessary
'w' or 'w:' open for writing without compression
'w:gz' open for writing with gzip compression
'w:bz2' open for writing with bzip2 compression
'w:xz' open for writing with lzma compression
'x' or 'x:' create a tarfile exclusively without compression, raise
an exception if the file is already created
'x:gz' create a gzip compressed tarfile, raise an exception
if the file is already created
'x:bz2' create a bzip2 compressed tarfile, raise an exception
if the file is already created
'x:xz' create an lzma compressed tarfile, raise an exception
if the file is already created
'r|*' open a stream of tar blocks with transparent compression
'r|' open an uncompressed stream of tar blocks for reading
'r|gz' open a gzip compressed stream of tar blocks
'r|bz2' open a bzip2 compressed stream of tar blocks
'r|xz' open an lzma compressed stream of tar blocks
'w|' open an uncompressed stream for writing
'w|gz' open a gzip compressed stream for writing
'w|bz2' open a bzip2 compressed stream for writing
'w|xz' open an lzma compressed stream for writing
"""
if not name and not fileobj:
raise ValueError("nothing to open")
if mode in ("r", "r:*"):
# Find out which *open() is appropriate for opening the file.
def not_compressed(comptype):
return cls.OPEN_METH[comptype] == 'taropen'
for comptype in sorted(cls.OPEN_METH, key=not_compressed):
func = getattr(cls, cls.OPEN_METH[comptype])
if fileobj is not None:
saved_pos = fileobj.tell()
try:
return func(name, "r", fileobj, **kwargs)
except (ReadError, CompressionError):
if fileobj is not None:
fileobj.seek(saved_pos)
continue
> raise ReadError("file could not be opened successfully")
E tarfile.ReadError: file could not be opened successfully
/usr/lib/python3.7/tarfile.py:1580: ReadError
TEST RESULT
TEST RESULT
- Run At
- Jun 15 2022, 8:42 AM