Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Skip some dataframe tests on Linux #5632

Merged
merged 2 commits into from
Nov 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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