Skip to content

Commit

Permalink
Merge pull request #6044 from CAM-Gerlach/skip-tests
Browse files Browse the repository at this point in the history
PR: Skip several failing tests on Windows and one on a specific CI build
  • Loading branch information
ccordoba12 authored Dec 26, 2017
2 parents 87cbabf + cc9ec20 commit 1ca9d1a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
15 changes: 15 additions & 0 deletions spyder/app/tests/script_pylint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#%%

# pylint: enable=C0111
# pylint: enable=C0103
# pylint: enable=C0413

a = 10


#%%
li = [1, 2, 3]

#%%
import numpy as np
arr = np.array(li)
13 changes: 7 additions & 6 deletions spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import os
import os.path as osp
from sys import version_info
import shutil
import tempfile

Expand Down Expand Up @@ -138,8 +139,8 @@ def close_window():
# IMPORTANT NOTE: Please leave this test to be the first one here to
# avoid possible timeouts in Appveyor
@flaky(max_runs=3)
@pytest.mark.skipif(os.environ.get('CI', None) is not None,
reason="It times out in our CIs")
@pytest.mark.skipif(os.environ.get('CI', None) is not None or os.name == 'nt',
reason="It times out in our CIs, and apparently Windows.")
@pytest.mark.timeout(timeout=60, method='thread')
@pytest.mark.use_introspection
def test_calltip(main_window, qtbot):
Expand Down Expand Up @@ -531,8 +532,8 @@ def test_run_cython_code(main_window, qtbot):


@flaky(max_runs=3)
@pytest.mark.skipif(os.environ.get('CI', None) is not None,
reason="It times out in our CIs")
@pytest.mark.skipif(os.environ.get('CI', None) is not None or os.name == 'nt',
reason="It times out in our CIs and fails on Windows.")
def test_open_notebooks_from_project_explorer(main_window, qtbot):
"""Test that notebooks are open from the Project explorer."""
projects = main_window.projects
Expand Down Expand Up @@ -1109,11 +1110,11 @@ def test_run_static_code_analysis(main_window, qtbot):
pylint = get_thirdparty_plugin(main_window, "Static code analysis")

# Do an analysis
test_file = osp.join(LOCATION, 'script.py')
test_file = osp.join(LOCATION, 'script_pylint.py')
main_window.editor.load(test_file)
code_editor = main_window.editor.get_focus_widget()
qtbot.keyClick(code_editor, Qt.Key_F8)
qtbot.wait(500)
qtbot.wait(3000)

# Perform the test
# Check output of the analysis
Expand Down
5 changes: 3 additions & 2 deletions spyder/plugins/tests/test_editor_introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def get_spyder_pythonpath(*args):
editor.introspector.plugin_manager.close()


@flaky(max_runs=3)
@pytest.mark.skipif(os.environ.get('CI', None) is not None,
reason="This test fails too much in the CI :(")
@pytest.mark.skipif(not JEDI_010,
Expand All @@ -73,11 +74,11 @@ def test_introspection(setup_editor):

# Complete fr --> from
qtbot.keyClicks(code_editor, 'fr')
qtbot.wait(5000)
qtbot.wait(20000)

# press tab and get completions
with qtbot.waitSignal(completion.sig_show_completions,
timeout=5000) as sig:
timeout=10000) as sig:
qtbot.keyPress(code_editor, Qt.Key_Tab)
assert "from" in sig.args[0]

Expand Down

0 comments on commit 1ca9d1a

Please sign in to comment.