Skip to content

Commit

Permalink
Merge from 3.x: PR #4875
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Aug 1, 2017
2 parents 85650c7 + 5b38d69 commit 5ffcf2b
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 32 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ before_install:

install:
- ./continuous_integration/travis/install.sh;
- ./continuous_integration/travis/install-qt.sh;

script:
- |
if [ "$USE_PYQT" = "pyqt5" ]; then
./continuous_integration/travis/test-qt5.sh || ./continuous_integration/travis/test-qt5.sh
else
./continuous_integration/travis/test-qt4.sh || ./continuous_integration/travis/test-qt4.sh
fi
- ./continuous_integration/travis/runtests.sh || ./continuous_integration/travis/runtests.sh || ./continuous_integration/travis/runtests.sh;

after_success:
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
export PATH="$HOME/miniconda/bin:$PATH"
source activate test

pip uninstall -q -y pytest-xvfb

# We test with pip packages in Python 3.5 and PyQt5
if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
pip uninstall -q -y pytest-xvfb
pip install -q pyqt5
else
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib

# Install qtconsole from Github
conda remove -q -y qtconsole
pip install git+https://github.com/jupyter/qtconsole.git
fi

python runtests.py
# Install qtpy from Github
pip install git+https://github.com/spyder-ide/qtpy.git
elif [ "$USE_PYQT" = "pyqt5" ]; then
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
else
conda install -q qt=4.* pyqt=4.* qtconsole matplotlib
fi
6 changes: 1 addition & 5 deletions continuous_integration/travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
else
export CONDA_DEPENDENCIES_FLAGS="--quiet"
export CONDA_DEPENDENCIES="rope pyflakes sphinx pygments pylint psutil nbconvert \
qtawesome pickleshare pyzmq chardet mock nomkl pandas \
qtawesome pickleshare qtpy pyzmq chardet mock nomkl pandas \
pytest pytest-cov numpydoc scipy cython pillow jedi pycodestyle"
export PIP_DEPENDENCIES="coveralls pytest-qt pytest-timeout flaky"
fi
Expand All @@ -23,10 +23,6 @@ export PATH="$HOME/miniconda/bin:$PATH"
source activate test


# Install qtpy from Github
pip install git+https://github.com/spyder-ide/qtpy.git


# We test with pip packages in Python 3.5 and PyQt5
if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
# Install qtconsole from Github
Expand Down
6 changes: 6 additions & 0 deletions continuous_integration/travis/runtests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

export PATH="$HOME/miniconda/bin:$PATH"
source activate test

python runtests.py
13 changes: 0 additions & 13 deletions continuous_integration/travis/test-qt4.sh

This file was deleted.

4 changes: 4 additions & 0 deletions spyder/app/tests/test_mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def test_calltip(main_window, qtbot):
@flaky(max_runs=3)
def test_runconfig_workdir(main_window, qtbot, tmpdir):
"""Test runconfig workdir options."""
CONF.set('run', 'configurations', [])

# ---- Load test file ----
test_file = osp.join(LOCATION, 'script.py')
main_window.editor.load(test_file)
Expand All @@ -184,6 +186,7 @@ def test_runconfig_workdir(main_window, qtbot, tmpdir):
shell = main_window.ipyconsole.get_current_shellwidget()
qtbot.waitUntil(lambda: shell._prompt_html is not None, timeout=SHELL_TIMEOUT)
qtbot.keyClick(code_editor, Qt.Key_F5)
qtbot.wait(500)

# --- Assert we're in cwd after execution ---
with qtbot.waitSignal(shell.executed):
Expand All @@ -203,6 +206,7 @@ def test_runconfig_workdir(main_window, qtbot, tmpdir):
shell = main_window.ipyconsole.get_current_shellwidget()
qtbot.waitUntil(lambda: shell._prompt_html is not None, timeout=SHELL_TIMEOUT)
qtbot.keyClick(code_editor, Qt.Key_F5)
qtbot.wait(500)

# --- Assert we're in fixed dir after execution ---
with qtbot.waitSignal(shell.executed):
Expand Down
2 changes: 1 addition & 1 deletion spyder/widgets/ipythonconsole/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def kernel_restarted_message(self, msg):
stderr = self._read_stderr()
except:
stderr = None
except OSError:
except (OSError, IOError):
stderr = None

if stderr:
Expand Down

0 comments on commit 5ffcf2b

Please sign in to comment.