File: test_public_api.py

package info (click to toggle)
ipython 1.2.1-2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 22,884 kB
  • sloc: python: 67,305; makefile: 469; lisp: 272; sh: 251
file content (47 lines) | stat: -rw-r--r-- 1,308 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""Test the IPython.kernel public API

Authors
-------
* MinRK
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------

import nose.tools as nt

from IPython.testing import decorators as dec

from IPython.kernel import launcher, connect
from IPython import kernel

#-----------------------------------------------------------------------------
# Classes and functions
#-----------------------------------------------------------------------------

@dec.parametric
def test_kms():
    for base in ("", "Multi"):
        KM = base + "KernelManager"
        yield nt.assert_true(KM in dir(kernel), KM)

@dec.parametric
def test_kcs():
    for base in ("", "Blocking"):
        KM = base + "KernelClient"
        yield nt.assert_true(KM in dir(kernel), KM)

@dec.parametric
def test_launcher():
    for name in launcher.__all__:
        yield nt.assert_true(name in dir(kernel), name)

@dec.parametric
def test_connect():
    for name in connect.__all__:
        yield nt.assert_true(name in dir(kernel), name)