You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=============================testsessionstarts==============================platformdarwin--Python3.12.2, pytest-8.1.1, pluggy-1.4.0--/Users/petecheslock/repos/indico/venv/bin/pythoncachedir: .pytest_cacherootdir: /Users/petecheslock/repos/indicoconfigfile: pytest.iniplugins: snapshot-0.9.0, cov-5.0.0, indico-3.3.4.dev0, redis-3.0.2, anyio-4.3.0, appmap-2.1.4, mock-3.14.0, localserver-0.8.1collecting ... collected1itemindico/modules/events/export_test.py::test_event_exportFAILED [100%]
===================================FAILURES===================================______________________________test_event_export_______________________________db=<IndicoSQLAlchemypostgresql:///test?host=%2Fvar%2Ffolders%2F2y%2Ft_jpbzqd07l4969l1523q2y40000gn%2FT%2Findicotestpg.bcr_yi8e>dummy_event=<Event(0, 2017-08-2410:00:00+00:00, 2017-08-2412:00:00+00:00): "dummy#0">monkeypatch=<_pytest.monkeypatch.MonkeyPatchobjectat0x11df6f800>@pytest.mark.usefixtures('reproducible_uuids', 'static_indico_version')deftest_event_export(db, dummy_event, monkeypatch):
monkeypatch.setattr('indico.modules.events.export.now_utc', lambda: as_utc(datetime(2017, 8, 24, 9, 0, 0)))
f=BytesIO()
dummy_event.created_dt=as_utc(datetime(2017, 8, 24, 0, 0, 0))
dummy_event.start_dt=as_utc(datetime(2017, 8, 24, 10, 0, 0))
dummy_event.end_dt=as_utc(datetime(2017, 8, 24, 12, 0, 0))
s=Session(event=dummy_event, title='sd', is_deleted=True)
Contribution(event=dummy_event, title='c1', duration=timedelta(minutes=30))
Contribution(event=dummy_event, title='c2', session=s, duration=timedelta(minutes=30), is_deleted=True)
db.session.flush()
export_event(dummy_event, f)
f.seek(0)
data_yaml_content= (Path(__file__).parent/'export_test_1.yaml').read_text()
# check composition of tarfile and data.yaml content>withtarfile.open(fileobj=f) astarf:
indico/modules/events/export_test.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls=<class'tarfile.TarFile'>, name=None, mode='r'fileobj=<_io.BytesIOobjectat0x11f210d10>, bufsize=10240, kwargs= {}
not_compressed=<functionTarFile.open.<locals>.not_compressedat0x11efe98a0>error_msgs= ["- method gz: ReadError('empty file')", "- method bz2: ReadError('not a bzip2 file')", "- method xz: ReadError('not an lzma file')", "- method tar: ReadError('empty file')"]
comptype='tar'func=<boundmethodTarFile.taropenof<class'tarfile.TarFile'>>saved_pos=0error_msgs_summary="- method gz: ReadError('empty file')\n- method bz2: ReadError('not a bzip2 file')\n- method xz: ReadError('not an lzma file')\n- method tar: ReadError('empty file')"@classmethoddefopen(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 """ifnotnameandnotfileobj:
raiseValueError("nothing to open")
ifmodein ("r", "r:*"):
# Find out which *open() is appropriate for opening the file.defnot_compressed(comptype):
returncls.OPEN_METH[comptype] =='taropen'error_msgs= []
forcomptypeinsorted(cls.OPEN_METH, key=not_compressed):
func=getattr(cls, cls.OPEN_METH[comptype])
iffileobjisnotNone:
saved_pos=fileobj.tell()
try:
returnfunc(name, "r", fileobj, **kwargs)
except (ReadError, CompressionError) ase:
error_msgs.append(f'- method {comptype}: {e!r}')
iffileobjisnotNone:
fileobj.seek(saved_pos)
continueerror_msgs_summary='\n'.join(error_msgs)
>raiseReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
Etarfile.ReadError: filecouldnotbeopenedsuccessfully:
E-methodgz: ReadError('empty file')
E-methodbz2: ReadError('not a bzip2 file')
E-methodxz: ReadError('not an lzma file')
E-methodtar: ReadError('empty file')
../../.asdf/installs/python/3.12.2/lib/python3.12/tarfile.py:1809: ReadError------------------------------Capturedlogcall-------------------------------INFO_appmap.recording:recording.py:104writing/Users/petecheslock/repos/indico/tmp/appmap/pytest/test_event_export.appmap.json===========================shorttestsummaryinfo============================FAILEDindico/modules/events/export_test.py::test_event_export-tarfile.Read...
==============================1failedin13.20s==============================
=============================testsessionstarts==============================platformdarwin--Python3.12.2, pytest-8.1.1, pluggy-1.4.0--/Users/petecheslock/repos/indico/venv/bin/pythoncachedir: .pytest_cacherootdir: /Users/petecheslock/repos/indicoconfigfile: pytest.iniplugins: snapshot-0.9.0, cov-5.0.0, indico-3.3.4.dev0, redis-3.0.2, anyio-4.3.0, appmap-2.1.4, mock-3.14.0, localserver-0.8.1collecting ... collected1itemindico/modules/events/export_test.py::test_event_attachment_exportFAILED [100%]
===================================FAILURES===================================_________________________test_event_attachment_export_________________________db=<IndicoSQLAlchemypostgresql:///test?host=%2Fvar%2Ffolders%2F2y%2Ft_jpbzqd07l4969l1523q2y40000gn%2FT%2Findicotestpg.8pucq15u>dummy_event=<Event(0, 2024-07-3013:42:00+00:00, 2024-07-3014:42:00+00:00): "dummy#0">
@pytest.mark.usefixtures('reproducible_uuids', 'dummy_attachment')
deftest_event_attachment_export(db, dummy_event):
s=Session(event=dummy_event, title='sd', is_deleted=True)
Contribution(event=dummy_event, title='c1', duration=timedelta(minutes=30))
Contribution(event=dummy_event, title='c2', session=s, duration=timedelta(minutes=30), is_deleted=True)
db.session.flush()
f=BytesIO()
export_event(dummy_event, f)
f.seek(0)
>withtarfile.open(fileobj=f) astarf:
indico/modules/events/export_test.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls=<class'tarfile.TarFile'>, name=None, mode='r'fileobj=<_io.BytesIOobjectat0x12d13c8b0>, bufsize=10240, kwargs= {}
not_compressed=<functionTarFile.open.<locals>.not_compressedat0x12cfb1580>error_msgs= ["- method gz: ReadError('empty file')", "- method bz2: ReadError('not a bzip2 file')", "- method xz: ReadError('not an lzma file')", "- method tar: ReadError('empty file')"]
comptype='tar'func=<boundmethodTarFile.taropenof<class'tarfile.TarFile'>>saved_pos=0error_msgs_summary="- method gz: ReadError('empty file')\n- method bz2: ReadError('not a bzip2 file')\n- method xz: ReadError('not an lzma file')\n- method tar: ReadError('empty file')"@classmethoddefopen(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 """ifnotnameandnotfileobj:
raiseValueError("nothing to open")
ifmodein ("r", "r:*"):
# Find out which *open() is appropriate for opening the file.defnot_compressed(comptype):
returncls.OPEN_METH[comptype] =='taropen'error_msgs= []
forcomptypeinsorted(cls.OPEN_METH, key=not_compressed):
func=getattr(cls, cls.OPEN_METH[comptype])
iffileobjisnotNone:
saved_pos=fileobj.tell()
try:
returnfunc(name, "r", fileobj, **kwargs)
except (ReadError, CompressionError) ase:
error_msgs.append(f'- method {comptype}: {e!r}')
iffileobjisnotNone:
fileobj.seek(saved_pos)
continueerror_msgs_summary='\n'.join(error_msgs)
>raiseReadError(f"file could not be opened successfully:\n{error_msgs_summary}")
Etarfile.ReadError: filecouldnotbeopenedsuccessfully:
E-methodgz: ReadError('empty file')
E-methodbz2: ReadError('not a bzip2 file')
E-methodxz: ReadError('not an lzma file')
E-methodtar: ReadError('empty file')
../../.asdf/installs/python/3.12.2/lib/python3.12/tarfile.py:1809: ReadError------------------------------Capturedlogcall-------------------------------INFO_appmap.recording:recording.py:104writing/Users/petecheslock/repos/indico/tmp/appmap/pytest/test_event_attachment_export.appmap.json===========================shorttestsummaryinfo============================FAILEDindico/modules/events/export_test.py::test_event_attachment_export-t...
==============================1failedin13.27s==============================
Appmap library version
2.1.4
Python
3.12.2
Using the Indico fork mailnline branch
The following tests fail when using
appmap-python pytest -vv <path to test>
indico/modules/events/export_test.py::test_event_export
indico/modules/events/export_test.py::test_event_attachment_export
indico/modules/events/papers/models/papers_test.py::test_can_judge
indico/util/i18n_test.py::test_lazy_translation
The text was updated successfully, but these errors were encountered: