FirebirdSQL / firebird-qa

Python tools used for Firebird QA
https://firebirdsql.org/en/devel-qa/
MIT License
3 stars 6 forks source link

Need to downgrade pytest version #21

Closed ant-zuev closed 9 months ago

ant-zuev commented 9 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

pcisar commented 9 months ago

Fixed in v0.19.1

pcisar commented 9 months ago

Well, the bug was actually in firebird-base package, so the fix in firebird-qa was reverted in v0.19.2 release.