##// END OF EJS Templates
Merging -r 1196 from lp:ipython....
Brian Granger -
r2150:b44b6920 merge
parent child Browse files
Show More
@@ -43,7 +43,6 b' def doctest_hist_f():'
43 43 In [10]: tfile = tempfile.mktemp('.py','tmp-ipython-')
44 44
45 45 In [11]: %hist -n -f $tfile 3
46
47 46 """
48 47
49 48
@@ -2,6 +2,9 b''
2 2
3 3 XXX - This module is missing proper docs.
4 4 """
5 # Tell nose to skip this module
6 __test__ = {}
7
5 8 import sys
6 9
7 10 from twisted.internet import reactor, threads
@@ -3,6 +3,9 b' Base front end class for all async frontends.'
3 3 """
4 4 __docformat__ = "restructuredtext en"
5 5
6 # Tell nose to skip this module
7 __test__ = {}
8
6 9 #-------------------------------------------------------------------------------
7 10 # Copyright (C) 2008 The IPython Development Team
8 11 #
@@ -10,20 +13,25 b' __docformat__ = "restructuredtext en"'
10 13 # the file COPYING, distributed as part of this software.
11 14 #-------------------------------------------------------------------------------
12 15
13
14 16 #-------------------------------------------------------------------------------
15 17 # Imports
16 18 #-------------------------------------------------------------------------------
17 19
20 # Third-party
21 from twisted.python.failure import Failure
22 from zope.interface import implements, classProvides
23
24 # From IPython
18 25 from IPython.external import guid
19 26
20 from zope.interface import Interface, Attribute, implements, classProvides
21 from twisted.python.failure import Failure
22 from IPython.frontend.frontendbase import (
23 FrontEndBase, IFrontEnd, IFrontEndFactory)
27 from IPython.frontend.frontendbase import (FrontEndBase, IFrontEnd,
28 IFrontEndFactory)
24 29 from IPython.kernel.core.history import FrontEndHistory
25 30 from IPython.kernel.engineservice import IEngineCore
26 31
32 #-----------------------------------------------------------------------------
33 # Classes and functions
34 #-----------------------------------------------------------------------------
27 35
28 36 class AsyncFrontEndBase(FrontEndBase):
29 37 """
@@ -41,8 +49,7 b' class AsyncFrontEndBase(FrontEndBase):'
41 49 self.history = FrontEndHistory(input_cache=[''])
42 50 else:
43 51 self.history = history
44
45
52
46 53 def execute(self, block, blockID=None):
47 54 """Execute the block and return the deferred result.
48 55
@@ -73,5 +80,3 b' class AsyncFrontEndBase(FrontEndBase):'
73 80 errback=self.render_error)
74 81
75 82 return d
76
77
@@ -3,6 +3,9 b''
3 3 """This file contains unittests for the asyncfrontendbase module."""
4 4
5 5 __docformat__ = "restructuredtext en"
6
7 # Tell nose to skip this module
8 __test__ = {}
6 9
7 10 #---------------------------------------------------------------------------
8 11 # Copyright (C) 2008 The IPython Development Team
@@ -10,20 +13,21 b' __docformat__ = "restructuredtext en"'
10 13 # Distributed under the terms of the BSD License. The full license is in
11 14 # the file COPYING, distributed as part of this software.
12 15 #---------------------------------------------------------------------------
13
16
14 17 #---------------------------------------------------------------------------
15 18 # Imports
16 19 #---------------------------------------------------------------------------
17 20
18 # Tell nose to skip this module
19 __test__ = {}
20
21 21 from twisted.trial import unittest
22
22 23 from IPython.frontend.asyncfrontendbase import AsyncFrontEndBase
23 24 from IPython.frontend import frontendbase
24 25 from IPython.kernel.engineservice import EngineService
25 26 from IPython.testing.parametric import Parametric, parametric
26 27
28 #-----------------------------------------------------------------------------
29 # Classes and functions
30 #-----------------------------------------------------------------------------
27 31
28 32 class FrontEndCallbackChecker(AsyncFrontEndBase):
29 33 """FrontEndBase subclass for checking callbacks"""
@@ -106,4 +110,3 b' class TestAsyncFrontendBase(unittest.TestCase):'
106 110 def test_history_returns_none_at_startup(self):
107 111 self.assert_(self.fb.get_history_previous("")==None)
108 112 self.assert_(self.fb.get_history_next()==None)
109
@@ -23,6 +23,10 b' method that automatically added methods to engines.'
23 23
24 24 __docformat__ = "restructuredtext en"
25 25
26 # Tell nose to skip this module. I don't think we need this as nose
27 # shouldn't ever be run on this!
28 __test__ = {}
29
26 30 #-------------------------------------------------------------------------------
27 31 # Copyright (C) 2008 The IPython Development Team
28 32 #
@@ -34,12 +38,9 b' __docformat__ = "restructuredtext en"'
34 38 # Imports
35 39 #-------------------------------------------------------------------------------
36 40
37 # Tell nose to skip the testing of this module
38 __test__ = {}
39
40 import os, sys, copy
41 import copy
42 import sys
41 43 import cPickle as pickle
42 from new import instancemethod
43 44
44 45 from twisted.application import service
45 46 from twisted.internet import defer, reactor
@@ -47,11 +48,7 b' from twisted.python import log, failure, components'
47 48 import zope.interface as zi
48 49
49 50 from IPython.kernel.core.interpreter import Interpreter
50 from IPython.kernel import newserialized, error, util
51 from IPython.kernel.util import printer
52 from IPython.kernel.twistedutil import gatherBoth, DeferredList
53 from IPython.kernel import codeutil
54
51 from IPython.kernel import newserialized, error
55 52
56 53 #-------------------------------------------------------------------------------
57 54 # Interface specification for the Engine
@@ -4,6 +4,9 b''
4 4
5 5 __docformat__ = "restructuredtext en"
6 6
7 # Tell nose to skip this module
8 __test__ = {}
9
7 10 #-------------------------------------------------------------------------------
8 11 # Copyright (C) 2008 The IPython Development Team
9 12 #
@@ -14,9 +17,9 b' __docformat__ = "restructuredtext en"'
14 17 #-------------------------------------------------------------------------------
15 18 # Imports
16 19 #-------------------------------------------------------------------------------
20 from twisted.python import failure
17 21
18 22 from IPython.kernel.core import error
19 from twisted.python import failure
20 23
21 24 #-------------------------------------------------------------------------------
22 25 # Error classes
@@ -5,6 +5,9 b''
5 5
6 6 __docformat__ = "restructuredtext en"
7 7
8 # Tell nose to skip this module
9 __test__ = {}
10
8 11 #-------------------------------------------------------------------------------
9 12 # Copyright (C) 2008 The IPython Development Team
10 13 #
@@ -18,8 +21,8 b' __docformat__ = "restructuredtext en"'
18 21
19 22 import cPickle as pickle
20 23
21 from zope.interface import Interface, implements
22 24 from twisted.python import components
25 from zope.interface import Interface, implements
23 26
24 27 try:
25 28 import numpy
@@ -28,6 +31,10 b' except ImportError:'
28 31
29 32 from IPython.kernel.error import SerializationError
30 33
34 #-----------------------------------------------------------------------------
35 # Classes and functions
36 #-----------------------------------------------------------------------------
37
31 38 class ISerialized(Interface):
32 39
33 40 def getData():
@@ -108,6 +108,27 b' def make_exclude():'
108 108 if not have_pexpect:
109 109 EXCLUDE.append(pjoin('IPython', 'scripts', 'irunner'))
110 110
111 # This is scary. We still have things in frontend and testing that
112 # are being tested by nose that use twisted. We need to rethink
113 # how we are isolating dependencies in testing.
114 if not (have_twisted and have_zi and have_foolscap):
115 EXCLUDE.append(pjoin('IPython', 'frontend', 'asyncfrontendbase'))
116 EXCLUDE.append(pjoin('IPython', 'frontend', 'prefilterfrontend'))
117 EXCLUDE.append(pjoin('IPython', 'frontend', 'frontendbase'))
118 EXCLUDE.append(pjoin('IPython', 'frontend', 'linefrontendbase'))
119 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
120 'test_linefrontend'))
121 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
122 'test_frontendbase'))
123 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
124 'test_prefilterfrontend'))
125 EXCLUDE.append(pjoin('IPython', 'frontend', 'tests',
126 'test_asyncfrontendbase')),
127 EXCLUDE.append(pjoin('IPython', 'testing', 'parametric'))
128 EXCLUDE.append(pjoin('IPython', 'testing', 'util'))
129 EXCLUDE.append(pjoin('IPython', 'testing', 'tests',
130 'test_decorators_trial'))
131
111 132 # Skip shell always because of a bug in FakeModule.
112 133 EXCLUDE.append(pjoin('IPython', 'core', 'shell'))
113 134
General Comments 0
You need to be logged in to leave comments. Login now