FirebirdSQL / python3-driver

Firebird driver for Python that uses new Firebird API
https://www.firebirdsql.org/en/devel-python-driver/
MIT License
27 stars 10 forks source link

Need to downgrade pytest version #36

Closed ant-zuev closed 7 months ago

ant-zuev commented 7 months ago

After adding the pytest dependency version 8 and above to pyproject.toml, there were problems with some tests due to a bug in pytest release 8.0.0. For example, in the firebird-qa/tests/bugs/core_0859_test.py test there is a problem with exception handling:

self = <ExceptionInfo DatabaseError('Datatype ARRAY is not supported for sorting operation') tblen=5>
exc = DatabaseError('Datatype ARRAY is not supported for sorting operation')

    def _stringify_exception(self, exc: BaseException) -> str:
        return "\n".join(
>           [
                str(exc),
                *getattr(exc, "__notes__", []),
            ]
        )
E       TypeError: 'NoneType' object is not iterable

/usr/local/lib/python3.8/site-packages/_pytest/_code/code.py:702: TypeError

Similar problem in pytest-dev: https://github.com/pytest-dev/pytest/issues/11872