Skip to content

Commit

Permalink
Merge pull request #5632 from ccordoba12/skip-tests-pycodestyle
Browse files Browse the repository at this point in the history
PR: Skip some dataframe tests on Linux
  • Loading branch information
ccordoba12 authored Nov 1, 2017
2 parents ed53e29 + 50376aa commit 51f8f6b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ In this release 30 pull requests were merged

### New features

* Add a button to the Variable Explorer to remove to remove all variables at
* Add a button to the Variable Explorer to remove all variables at
once.

### Bugs fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ def test_dataframeeditor_with_datetimeindex():
assert data(dfm, 2, 1) == '2015-01-03 00:00:00'


@pytest.mark.skipif(PYQT4, reason="It generates a strange failure in another test")
@pytest.mark.skipif(not os.name == 'nt',
reason="It segfaults too much on Linux")
def test_sort_dataframe_with_duplicate_column(qtbot):
df = DataFrame({'A': [1, 3, 2], 'B': [4, 6, 5]})
df = concat((df, df.A), axis=1)
Expand All @@ -246,6 +247,8 @@ def test_sort_dataframe_with_duplicate_column(qtbot):
assert [data(dfm, row, 2) for row in range(len(df))] == ['4', '5', '6']


@pytest.mark.skipif(not os.name == 'nt',
reason="It segfaults too much on Linux")
def test_sort_dataframe_with_category_dtypes(qtbot): # cf. issue 5361
df = DataFrame({'A': [1, 2, 3, 4],
'B': ['a', 'b', 'c', 'd']})
Expand Down
19 changes: 10 additions & 9 deletions spyder/widgets/variableexplorer/tests/test_texteditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,18 @@
import pytest

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


@pytest.fixture
def setup_texteditor(qtbot, text):
"""Set up TextEditor."""
texteditor = TextEditor(text)
qtbot.addWidget(texteditor)
return texteditor


def test_texteditor(qtbot):
"""Run TextEditor dialog."""
text = """01234567890123456789012345678901234567890123456789012345678901234567890123456789
Expand All @@ -32,15 +34,14 @@ def test_texteditor(qtbot):
dlg_text = texteditor.get_value()
assert text == dlg_text


@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 51f8f6b

Please sign in to comment.