##// END OF EJS Templates
Fixing tests that are broken when dependencies are missing....
Brian Granger -
r1557:50c55f4b merge
parent child Browse files
Show More
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
@@ -26,10 +26,10 zope.interface is required to run asynchronous frontends.""" % e.message
26
26
27 from frontendbase import FrontEndBase, IFrontEnd, IFrontEndFactory
27 from frontendbase import FrontEndBase, IFrontEnd, IFrontEndFactory
28
28
29 from IPython.kernel.engineservice import IEngineCore
30 from IPython.kernel.core.history import FrontEndHistory
29 from IPython.kernel.core.history import FrontEndHistory
31
30
32 try:
31 try:
32 from IPython.kernel.engineservice import IEngineCore
33 from twisted.python.failure import Failure
33 from twisted.python.failure import Failure
34 except ImportError, e:
34 except ImportError, e:
35 e.message = """%s
35 e.message = """%s
@@ -14,14 +14,18 __docformat__ = "restructuredtext en"
14 #---------------------------------------------------------------------------
14 #---------------------------------------------------------------------------
15 # Imports
15 # Imports
16 #---------------------------------------------------------------------------
16 #---------------------------------------------------------------------------
17
18 try:
17 from IPython.kernel.core.interpreter import Interpreter
19 from IPython.kernel.core.interpreter import Interpreter
18 import IPython.kernel.engineservice as es
20 import IPython.kernel.engineservice as es
19 from IPython.testing.util import DeferredTestCase
21 from IPython.testing.util import DeferredTestCase
20 from twisted.internet.defer import succeed
22 from twisted.internet.defer import succeed
21 from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController
23 from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController
22
23 from Foundation import NSMakeRect
24 from Foundation import NSMakeRect
24 from AppKit import NSTextView, NSScrollView
25 from AppKit import NSTextView, NSScrollView
26 except ImportError:
27 import nose
28 raise nose.SkipTest("This test requires zope.interface, Twisted, Foolscap and PyObjC")
25
29
26 class TestIPythonCocoaControler(DeferredTestCase):
30 class TestIPythonCocoaControler(DeferredTestCase):
27 """Tests for IPythonCocoaController"""
31 """Tests for IPythonCocoaController"""
@@ -31,7 +35,6 class TestIPythonCocoaControler(DeferredTestCase):
31 self.engine = es.EngineService()
35 self.engine = es.EngineService()
32 self.engine.startService()
36 self.engine.startService()
33
37
34
35 def tearDown(self):
38 def tearDown(self):
36 self.controller = None
39 self.controller = None
37 self.engine.stopService()
40 self.engine.stopService()
@@ -28,7 +28,6 from zopeinterface import Interface, Attribute, implements, classProvides
28
28
29 from IPython.kernel.core.history import FrontEndHistory
29 from IPython.kernel.core.history import FrontEndHistory
30 from IPython.kernel.core.util import Bunch
30 from IPython.kernel.core.util import Bunch
31 from IPython.kernel.engineservice import IEngineCore
32
31
33 ##############################################################################
32 ##############################################################################
34 # TEMPORARY!!! fake configuration, while we decide whether to use tconfig or
33 # TEMPORARY!!! fake configuration, while we decide whether to use tconfig or
@@ -16,9 +16,14 __docformat__ = "restructuredtext en"
16 #---------------------------------------------------------------------------
16 #---------------------------------------------------------------------------
17
17
18 import unittest
18 import unittest
19
20 try:
19 from IPython.frontend.asyncfrontendbase import AsyncFrontEndBase
21 from IPython.frontend.asyncfrontendbase import AsyncFrontEndBase
20 from IPython.frontend import frontendbase
22 from IPython.frontend import frontendbase
21 from IPython.kernel.engineservice import EngineService
23 from IPython.kernel.engineservice import EngineService
24 except ImportError:
25 import nose
26 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
22
27
23 class FrontEndCallbackChecker(AsyncFrontEndBase):
28 class FrontEndCallbackChecker(AsyncFrontEndBase):
24 """FrontEndBase subclass for checking callbacks"""
29 """FrontEndBase subclass for checking callbacks"""
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
@@ -20,7 +20,6 from twisted.internet import defer
20 from IPython.kernel import engineservice as es
20 from IPython.kernel import engineservice as es
21 from IPython.kernel import multiengine as me
21 from IPython.kernel import multiengine as me
22 from IPython.kernel import newserialized
22 from IPython.kernel import newserialized
23 from IPython.kernel.error import NotDefined
24 from IPython.testing import util
23 from IPython.testing import util
25 from IPython.testing.parametric import parametric, Parametric
24 from IPython.testing.parametric import parametric, Parametric
26 from IPython.kernel import newserialized
25 from IPython.kernel import newserialized
@@ -30,8 +30,9 try:
30 from controllertest import IControllerCoreTestCase
30 from controllertest import IControllerCoreTestCase
31 from IPython.testing.util import DeferredTestCase
31 from IPython.testing.util import DeferredTestCase
32 except ImportError:
32 except ImportError:
33 pass
33 import nose
34 else:
34 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
35
35 class BasicControllerServiceTest(DeferredTestCase,
36 class BasicControllerServiceTest(DeferredTestCase,
36 IControllerCoreTestCase):
37 IControllerCoreTestCase):
37
38
@@ -37,9 +37,10 try:
37 IEngineSerializedTestCase, \
37 IEngineSerializedTestCase, \
38 IEngineQueuedTestCase
38 IEngineQueuedTestCase
39 except ImportError:
39 except ImportError:
40 print "we got an error!!!"
40 import nose
41 raise
41 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
42 else:
42
43
43 class EngineFCTest(DeferredTestCase,
44 class EngineFCTest(DeferredTestCase,
44 IEngineCoreTestCase,
45 IEngineCoreTestCase,
45 IEngineSerializedTestCase,
46 IEngineSerializedTestCase,
@@ -35,8 +35,10 try:
35 IEngineQueuedTestCase, \
35 IEngineQueuedTestCase, \
36 IEnginePropertiesTestCase
36 IEnginePropertiesTestCase
37 except ImportError:
37 except ImportError:
38 pass
38 import nose
39 else:
39 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
40
41
40 class BasicEngineServiceTest(DeferredTestCase,
42 class BasicEngineServiceTest(DeferredTestCase,
41 IEngineCoreTestCase,
43 IEngineCoreTestCase,
42 IEngineSerializedTestCase,
44 IEngineSerializedTestCase,
@@ -23,8 +23,10 try:
23 from IPython.kernel.tests.multienginetest import (IMultiEngineTestCase,
23 from IPython.kernel.tests.multienginetest import (IMultiEngineTestCase,
24 ISynchronousMultiEngineTestCase)
24 ISynchronousMultiEngineTestCase)
25 except ImportError:
25 except ImportError:
26 pass
26 import nose
27 else:
27 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
28
29
28 class BasicMultiEngineTestCase(DeferredTestCase, IMultiEngineTestCase):
30 class BasicMultiEngineTestCase(DeferredTestCase, IMultiEngineTestCase):
29
31
30 def setUp(self):
32 def setUp(self):
@@ -30,8 +30,8 try:
30 from IPython.kernel.error import CompositeError
30 from IPython.kernel.error import CompositeError
31 from IPython.kernel.util import printer
31 from IPython.kernel.util import printer
32 except ImportError:
32 except ImportError:
33 pass
33 import nose
34 else:
34 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
35
35
36 def _raise_it(f):
36 def _raise_it(f):
37 try:
37 try:
@@ -28,8 +28,9 try:
28 SerializeIt, \
28 SerializeIt, \
29 UnSerializeIt
29 UnSerializeIt
30 except ImportError:
30 except ImportError:
31 pass
31 import nose
32 else:
32 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
33
33 #-------------------------------------------------------------------------------
34 #-------------------------------------------------------------------------------
34 # Tests
35 # Tests
35 #-------------------------------------------------------------------------------
36 #-------------------------------------------------------------------------------
@@ -99,4 +100,3 else:
99 self.assert_(a.shape == final.shape)
100 self.assert_(a.shape == final.shape)
100
101
101
102
102 No newline at end of file
@@ -25,8 +25,8 try:
25 from IPython.kernel import error
25 from IPython.kernel import error
26 from IPython.kernel.util import printer
26 from IPython.kernel.util import printer
27 except ImportError:
27 except ImportError:
28 pass
28 import nose
29 else:
29 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
30
30
31 class Foo(object):
31 class Foo(object):
32
32
@@ -26,8 +26,9 try:
26 from IPython.testing.util import DeferredTestCase
26 from IPython.testing.util import DeferredTestCase
27 from IPython.kernel.tests.tasktest import ITaskControllerTestCase
27 from IPython.kernel.tests.tasktest import ITaskControllerTestCase
28 except ImportError:
28 except ImportError:
29 pass
29 import nose
30 else:
30 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
31
31 #-------------------------------------------------------------------------------
32 #-------------------------------------------------------------------------------
32 # Tests
33 # Tests
33 #-------------------------------------------------------------------------------
34 #-------------------------------------------------------------------------------
@@ -33,8 +33,9 try:
33 from IPython.kernel.error import CompositeError
33 from IPython.kernel.error import CompositeError
34 from IPython.kernel.parallelfunction import ParallelFunction
34 from IPython.kernel.parallelfunction import ParallelFunction
35 except ImportError:
35 except ImportError:
36 pass
36 import nose
37 else:
37 raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap")
38
38
39
39 #-------------------------------------------------------------------------------
40 #-------------------------------------------------------------------------------
40 # Tests
41 # Tests
1 NO CONTENT: modified file chmod 100755 => 100644
NO CONTENT: modified file chmod 100755 => 100644
@@ -349,6 +349,47 IPython. The current prototype of ``tconfig`` is located in the IPython sandbox.
349 .. _ConfigObj: http://www.voidspace.org.uk/python/configobj.html
349 .. _ConfigObj: http://www.voidspace.org.uk/python/configobj.html
350 .. _Traits: http://code.enthought.com/traits/
350 .. _Traits: http://code.enthought.com/traits/
351
351
352 Installation and testing scenarios
353 ==================================
354
355 This section outlines the various scenarios that we need to test before we release an IPython version. These scenarios represent different ways of installing IPython and its dependencies.
356
357 Installation scenarios
358 ----------------------
359
360 1. Install from tarball using `python setup.py install`.
361 a. With only readline+nose dependencies installed (test1)
362
363 virtualenv --no-site-packages test1
364 # Activate it
365 easy_install nose
366 easy_install readline # On OS X or pyreadline on win32
367 cd ipython-0.9.beta3
368 python setup.py install
369
370 b. With all dependencies installed (readline, zope.interface,
371 Twisted, foolscap, Sphinx, nose, pyOpenSSL) (test2)
372 2. Install using easy_install.
373 a. With only readline+nose dependencies installed (test3)
374 i. Default dependencies.
375 ii. Optional dependency sets (kernel, doc, test, security)
376 easy_install -f ipython-0.9.beta3-py2.5.egg IPython[kernel,doc,test,security]
377
378 b. With all dependencies already installed (test2)
379
380
381 Tests to run for these scenarios
382 --------------------------------
383
384 1. Run the full test suite.
385 2. Start a controller and engines and try a few things by hand.
386 a. Using ipcluster.
387 b. Using ipcontroller/ipengine by hand.
388 3. Run a few of the parallel examples.
389 4. Try the kernel with and without security with and without PyOpenSSL
390 installed.
391 5. Beat on the IPython terminal a bunch.
392 6. Make sure that furl files are being put in proper locations.
352
393
353
394
354
395
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now