Skip to content

test_install tests are failing on Fedora build #74

Open
@QuLogic

Description

@QuLogic

I'm not really sure why this is happening for me only, and not on CI, but all of test_install are failing except for protocol=None. This is during the build of tblib for Fedora, and it occurs on all releases (so Python 3.11 and 3.12). The failures are all similar to the following:

____________________________ test_install[class-5] _____________________________
tests/test_pickle_exception.py:91: in test_install
    assert expected_format_exception == ''.join(format_exception(type(exc), exc, exc.__traceback__))
E   assert 'Traceback (most recent call last):\n  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 43, in test_install\n    1 / 0  # noqa: B018\n    ~~^~~\nZeroDivisionError: division by zero\n\nDuring handling of the above e
xception, another exception occurred:\n\nTraceback (most recent call last):\n  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 46, in test_install\n    raise ValueError(\'blah\')\nValueError: blah\n\nThe above exception was
the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 55, in test_install\n    raise new_e from e\ntest_pickle_exception.CustomError: foo\nnote
1\nnote 2\n' == 'Traceback (most recent call last):\n  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 43, in test_install\n    1 / 0  # noqa: B018\n    ^^^^^^^^^^^^^^^^^\nZeroDivisionError: division by zero\n\nDuring handli
ng of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 46, in test_install\n    raise ValueError(\'blah\')\n    ^^^^^^^^^^^^^^^^^\nValu
eError: blah\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 55, in test_install\n    raise new_e from e\n    ^
^^^^^^^^^^^^^^^^\ntest_pickle_exception.CustomError: foo\nnote 1\nnote 2\n'
E       Traceback (most recent call last):
E         File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 43, in test_install
E           1 / 0  # noqa: B018
E     -     ^^^^^^^^^^^^^^^^^
E     +     ~~^~~
E       ZeroDivisionError: division by zero
E
E       During handling of the above exception, another exception occurred:
E
E       Traceback (most recent call last):
E         File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 46, in test_install
E           raise ValueError('blah')
E     -     ^^^^^^^^^^^^^^^^^
E       ValueError: blah
E
E       The above exception was the direct cause of the following exception:
E
E       Traceback (most recent call last):
E         File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 55, in test_install
E           raise new_e from e
E     -     ^^^^^^^^^^^^^^^^^
E       test_pickle_exception.CustomError: foo
E       note 1
E       note 2
----------------------------- Captured stdout call -----------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 43, in test_install
    1 / 0  # noqa: B018
    ~~^~~
ZeroDivisionError: division by zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 46, in test_install
    raise ValueError('blah')
ValueError: blah
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/builddir/build/BUILD/tblib-3.0.0/tests/test_pickle_exception.py", line 55, in test_install
    raise new_e from e
test_pickle_exception.CustomError: foo
note 1
note 2

It appears that the exact location of the error was lost in the pickled traceback, so all the carets don't appear correctly. I wonder if this is somehow related to the tblib not saving/restoring the tb_lasti attribute?

Fedora 37 & 38 are Python 3.11, and Fedora 39 and Rawhide are Python 3.12. Pytest versions vary, if that matters, starting from 7.4.3 in Rawhide down to 7.1.3 in F37.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions