Skip to content

Commit

Permalink
Testing: Simplify test_texteditor_setup_and_check
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Nov 1, 2017
1 parent 6e98e2a commit 9459289
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions spyder/widgets/variableexplorer/tests/test_texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
"""

# Test library imports
from qtpy import PYQT4
import pytest

# Local imports
from spyder.py3compat import PY2
from spyder.py3compat import PY3
from spyder.widgets.variableexplorer.texteditor import TextEditor


Expand All @@ -36,16 +35,13 @@ def test_texteditor(qtbot):
assert text == dlg_text


@pytest.mark.skipif(PYQT4, reason="It generates a strange error")
@pytest.mark.skipif(PY3, reason="It makes no sense in Python 3")
def test_texteditor_setup_and_check():
if PY2:
import string
dig_its = string.digits;
translate_digits = string.maketrans(dig_its,len(dig_its)*' ')
editor = TextEditor(None)
assert not editor.setup_and_check(translate_digits)
else:
assert True
import string
dig_its = string.digits;
translate_digits = string.maketrans(dig_its,len(dig_its)*' ')
editor = TextEditor(None)
assert not editor.setup_and_check(translate_digits)


if __name__ == "__main__":
Expand Down

0 comments on commit 9459289

Please sign in to comment.