Skip to content

Commit

Permalink
Prefs test
Browse files Browse the repository at this point in the history
  • Loading branch information
wlach committed Mar 11, 2021
1 parent 8305939 commit ded19fa
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions gui/tests/test_pref_editor.py
@@ -1,8 +1,6 @@
import os
import tempfile

import mozfile
import mozinfo
import pytest
from mock import patch
from PySide2.QtCore import Qt
Expand Down Expand Up @@ -46,16 +44,12 @@ def test_add_empty_pref_then_fill_it(qtbot, pref_editor):
qtbot.keyClicks(edit_widget, "world")

# now finish the edition
qtbot.keyClick(edit_widget, Qt.Key_Tab)
qtbot.keyClick(edit_widget, Qt.Key_Enter)

# check prefs
assert pref_editor.pref_model.rowCount() == 1
assert len(pref_editor.get_prefs()) == 1
if not os.getenv("TRAVIS") and mozinfo.os != "mac":
# under TRAVIS and mac, the edition fail somewhere. not sure
# why, since on my ubuntu it works well even with Xvfb.
# TODO: look at this later
assert pref_editor.get_prefs() == [("hello", "world")]
assert pref_editor.get_prefs() == [("hello", "world")]


def test_remove_pref(qtbot, pref_editor):
Expand Down

0 comments on commit ded19fa

Please sign in to comment.