New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop Python 3.6, test on 3.11 #419
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import sys | ||
|
||
import pytest | ||
|
||
from pytestqt.qt_compat import qt_api | ||
|
@@ -94,12 +96,22 @@ def data( | |
check_model(BrokenTypeModel(), should_pass=False) | ||
|
||
|
||
xfail_py311_pyside2 = pytest.mark.xfail( | ||
sys.version_info[:2] == (3, 11) and qt_api.pytest_qt_api == "pyside2", | ||
reason="Fails to OR mask flags", | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this is a PySide2 or Python 3.11 bug: >>> int(QtCore.Qt.AlignmentFlag.AlignHorizontal_Mask | QtCore.Qt.AlignmentFlag.AlignVertical_Mask)
TypeError: 'PySide2.QtCore.Qt.AlignmentFlag' object cannot be interpreted as an integer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: <class 'int'> returned a result with an exception set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bnavigator Thanks, #497 should help. |
||
|
||
|
||
@pytest.mark.parametrize( | ||
"role_value, should_pass", | ||
[ | ||
(qt_api.QtCore.Qt.AlignmentFlag.AlignLeft, True), | ||
(qt_api.QtCore.Qt.AlignmentFlag.AlignRight, True), | ||
(0xFFFFFF, False), | ||
pytest.param( | ||
qt_api.QtCore.Qt.AlignmentFlag.AlignLeft, True, marks=xfail_py311_pyside2 | ||
), | ||
pytest.param( | ||
qt_api.QtCore.Qt.AlignmentFlag.AlignRight, True, marks=xfail_py311_pyside2 | ||
), | ||
pytest.param(0xFFFFFF, False, marks=xfail_py311_pyside2), | ||
("foo", False), | ||
(object(), False), | ||
], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff here is a bit confusing.