Skip to content

Commit

Permalink
Merge branch 'tmontes-fix-editor-margin-connect-test'
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Mar 21, 2019
2 parents a5ba6f1 + 383aee9 commit f297c49
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/interface/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_Editor_connect_margin_ignores_margin_4():
ep.connect_margin(mock_fn)
margin = 4
line = 0
modifiers = Qt.KeyboardModifiers()
modifiers = Qt.NoModifier
ep.marginClicked.emit(margin, line, modifiers)
assert mock_fn.call_count == 0

Expand All @@ -143,9 +143,16 @@ def test_Editor_connect_margin_1_works():
ep.connect_margin(mock_fn)
margin = 1
line = 0
modifiers = Qt.KeyboardModifiers()
modifiers = Qt.NoModifier
ep.marginClicked.emit(margin, line, modifiers)
mock_fn.assert_called_once_with(margin, line, modifiers)

assert mock_fn.call_count == 1
args, _kwargs = mock_fn.call_args
call_margin, call_line, _call_modifiers = args
assert margin == call_margin
assert line == call_line
# Don't assert _call_modifiers value: not used in implementation and seems
# to fail intermittently on macOS.


def test_EditorPane_set_theme():
Expand Down

0 comments on commit f297c49

Please sign in to comment.