Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6b98dbc
add a basic appveyor config
itziakos Jan 31, 2017
1cb59d6
install test requirements
itziakos Jan 31, 2017
35b8955
add missing test dependency
itziakos Jan 31, 2017
88da553
this environment variable is not needed
itziakos Jan 31, 2017
27c547f
remove problematic option for now
itziakos Jan 31, 2017
98bacf7
try restricting the coverage report using the environment variable
itziakos Jan 31, 2017
1394a5b
verbose output is better
itziakos Jan 31, 2017
5d6eab1
install two more packages so that all the tests are executed
itziakos Jan 31, 2017
86609fa
allow failures for now
itziakos Jan 31, 2017
9102e83
run tests on 32bit
itziakos Jan 31, 2017
fe36576
add both items in the matrix
itziakos Jan 31, 2017
77f7674
add python 3.4 in the build matrix
itziakos Jan 31, 2017
e250cc7
add tests for python 3.5
itziakos Jan 31, 2017
2cd832f
use skipif instead of knownfailureif which needs special testrunners
itziakos Jan 31, 2017
caae7bb
nothing should fail
itziakos Jan 31, 2017
647c6d9
show current setup
itziakos Jan 31, 2017
73fb3d0
use a requirements file for the test dependencies
itziakos Jan 31, 2017
ae05d9e
the register function is not available on windows
itziakos Jan 31, 2017
46130d6
remove print
itziakos Jan 31, 2017
9daf682
add testing on python 3.6
itziakos Jan 31, 2017
eca2f8a
use cmd to avoid pip warnings to be detected as errors
itziakos Jan 31, 2017
7afb6ae
fail the build as soon as the a matrix item fails
itziakos Jan 31, 2017
41d4b12
minor cleanup
itziakos Jan 31, 2017
60a1bf8
fix typos in matrix section
itziakos Jan 31, 2017
a8e1915
we need to also use cmd for the tests
itziakos Jan 31, 2017
928b2e9
rework appveyor yml to not use the nose coverage plugin
itziakos Feb 2, 2017
0c2ed53
no need to fail fast
itziakos Feb 2, 2017
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
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
branch = True
source = ipykernel

[report]
omit = *test*
40 changes: 40 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
build: false
shallow_clone: true

environment:

global:
distutils_use_sdk: 1
NOSE_COVER_PACKAGE: "ipykernel"

matrix:
- python: "C:/Python27-x64"
- python: "C:/Python27"
- python: "C:/Python34-x64"
- python: "C:/Python34"
- python: "C:/Python35-x64"
- python: "C:/Python35"
- python: "C:/Python36-x64"
- python: "C:/Python36"

cache:
- C:\Users\appveyor\AppData\Local\pip\Cache

init:
- ps: $Env:path = $Env:python + ";" + $Env:python + "\scripts;" + $Env:path
install:
- ps: python -m pip install --upgrade --no-binary wheel pip
- ps: pip install --upgrade wheel
- ps: pip --version

- ps: pip install -e .

- cmd: pip install -r test-requirements.txt
- ps: pip freeze

- ps: python -c 'import ipykernel.kernelspec; ipykernel.kernelspec.install(user=True)'
test_script:
- cmd: coverage run -p -m nose.core -v --with-timer --timer-top-n 10 ipykernel
on_success:
- ps: pip install codecov
- ps: codecov
20 changes: 11 additions & 9 deletions ipykernel/tests/test_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import io
import os.path
import pprint
import sys
import time

Expand All @@ -17,8 +16,9 @@
from IPython.paths import locate_profile
from ipython_genutils.tempdir import TemporaryDirectory

from .utils import (new_kernel, kernel, TIMEOUT, assemble_output, execute,
flush_channels, wait_for_idle)
from .utils import (
new_kernel, kernel, TIMEOUT, assemble_output, execute,
flush_channels, wait_for_idle)


def _check_master(kc, expected=True, stream="stdout"):
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_sys_path_profile_dir():
stdout, stderr = assemble_output(kc.iopub_channel)
nt.assert_equal(stdout, "''\n")

@dec.knownfailureif(sys.platform == 'win32', "subprocess prints fail on Windows")
@dec.skipif(sys.platform == 'win32', "subprocess prints fail on Windows")
def test_subprocess_print():
"""printing from forked mp.Process"""
with new_kernel() as kc:
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_subprocess_noprint():
_check_master(kc, expected=True, stream="stderr")


@dec.knownfailureif(sys.platform == 'win32', "subprocess prints fail on Windows")
@dec.skipif(sys.platform == 'win32', "subprocess prints fail on Windows")
def test_subprocess_error():
"""error in mp.Process doesn't crash"""
with new_kernel() as kc:
Expand Down Expand Up @@ -199,13 +199,15 @@ def test_save_history():
@dec.skip_without('faulthandler')
def test_smoke_faulthandler():
with kernel() as kc:
# Note: faulthandler.register is not available on windows.
code = u'\n'.join([
'import faulthandler, signal',
'import sys',
'import faulthandler',
'import signal',
'faulthandler.enable()',
'faulthandler.register(signal.SIGTERM)',
])
'if not sys.platform.startswith("win32"):',
' faulthandler.register(signal.SIGTERM)'])
_, reply = execute(code, kc=kc)
print(_)
nt.assert_equal(reply['status'], 'ok', reply.get('traceback', ''))


Expand Down
8 changes: 8 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
nose
nose-timer
coverage
mock
nose_warnings_filters
numpy
matplotlib
faulthandler ; python_version < "3"