Skip to content

Commit

Permalink
Check QtWidgets.QFileDialog.Options definition
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Aug 21, 2023
1 parent bada0d7 commit 255c6b4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qtpy/tests/test_qtwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def test_opengl_imports():
reason="Crashes on macOS with Python 3.7 with 'Illegal instruction: 4'")
@pytest.mark.parametrize("keyword", ["dir", "directory"])
@pytest.mark.parametrize("instance", [True, False])
def test_qfiledialog_compat(tmp_path, qtbot, keyword, instance):
def test_qfiledialog_dir_compat(tmp_path, qtbot, keyword, instance):
"""
This function is testing if the decorators that renamed the dir/directory
keyword are working.
Expand Down Expand Up @@ -229,4 +229,11 @@ def run(self, allow_restart=True):
qtbot.waitUntil(thr.isRunning, timeout=1000)
dlg = QtWidgets.QFileDialog() if instance else QtWidgets.QFileDialog
dlg.getExistingDirectory(**kwargs)
qtbot.waitUntil(thr.isFinished, timeout=3000)
qtbot.waitUntil(thr.isFinished, timeout=3000)


def test_qfiledialog_flags_typedef():
"""
Test existence of `QFlags<Option>` typedef `Options` that was removed from PyQt6
"""
assert QtWidgets.QFileDialog.Options is not None

0 comments on commit 255c6b4

Please sign in to comment.