Skip to content

Commit

Permalink
Add test to ensure QToolBar passes isinstance check
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Dec 12, 2024
1 parent 3a36157 commit 27de0f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qtpy/tests/test_qtwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ def test_QToolBar_functions(qtbot):
)


def test_QToolBar_submenu_instance(qtbot):
"""Test `QtWidgets.QToolBar` passes `isinstance` checks."""
window = QtWidgets.QMainWindow()
new_toolbar = window.addToolBar("Toolbar title")
assert isinstance(new_toolbar, QtWidgets.QToolBar)


@pytest.mark.skipif(
PYQT5 and PYQT_VERSION.startswith("5.9"),
reason="A specific setup with at least sip 4.9.9 is needed for PyQt5 5.9.*"
Expand Down

0 comments on commit 27de0f4

Please sign in to comment.