Skip to content

Commit

Permalink
tests: same as previous commit but working this time
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuDartiailh committed Jun 13, 2022
1 parent 2aa659b commit 83c96ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/widgets/test_drag_drop.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
QDropEvent,
QMouseEvent,
)

actions = [Qt.DropAction.CopyAction, Qt.DropAction.IgnoreAction]
except ImportError:
# The enaml_qtbot will cause the tests to be skipped
pass
actions = []

from utils import compile_source, wait_for_window_displayed

Expand Down Expand Up @@ -119,9 +121,7 @@ def create_drag_data(dtype, data):
"""


@pytest.mark.parametrize(
"action", [Qt.DropAction.CopyAction, Qt.DropAction.IgnoreAction]
)
@pytest.mark.parametrize("action", actions)
def test_drag_with_valid_drop(enaml_qtbot, monkeypatch, action):
"""Test performing a drag and drop operation."""
win = compile_source(SOURCE, "Main")()
Expand Down Expand Up @@ -230,7 +230,7 @@ def test_drop(enaml_qtbot):
drag_data.mime_data.q_data(),
Qt.LeftButton,
Qt.NoModifier,
QEvent.Type.Drop
QEvent.Type.Drop,
)
win.dt.proxy.widget.dropEvent(drop_event)
assert drop_event.isAccepted()
Expand Down

0 comments on commit 83c96ab

Please sign in to comment.