diff --git a/IPython/frontend/asyncfrontendbase.py b/IPython/frontend/asyncfrontendbase.py index 78afa18..cc7ada6 100644 --- a/IPython/frontend/asyncfrontendbase.py +++ b/IPython/frontend/asyncfrontendbase.py @@ -14,12 +14,13 @@ __docformat__ = "restructuredtext en" #------------------------------------------------------------------------------- # Imports #------------------------------------------------------------------------------- -from IPython.external import guid +from IPython.external import guid from zope.interface import Interface, Attribute, implements, classProvides from twisted.python.failure import Failure -from IPython.frontend.frontendbase import FrontEndBase, IFrontEnd, IFrontEndFactory +from IPython.frontend.frontendbase import ( + FrontEndBase, IFrontEnd, IFrontEndFactory) from IPython.kernel.core.history import FrontEndHistory from IPython.kernel.engineservice import IEngineCore diff --git a/IPython/frontend/cocoa/tests/test_cocoa_frontend.py b/IPython/frontend/cocoa/tests/test_cocoa_frontend.py index eb4dae2..58b78e4 100644 --- a/IPython/frontend/cocoa/tests/test_cocoa_frontend.py +++ b/IPython/frontend/cocoa/tests/test_cocoa_frontend.py @@ -15,30 +15,38 @@ __docformat__ = "restructuredtext en" # Imports #--------------------------------------------------------------------------- +# Tell nose to skip this module +__test__ = {} + +from twisted.trial import unittest +from twisted.internet.defer import succeed + +from IPython.kernel.core.interpreter import Interpreter +import IPython.kernel.engineservice as es + try: - from IPython.kernel.core.interpreter import Interpreter - import IPython.kernel.engineservice as es - from IPython.testing.util import DeferredTestCase - from twisted.internet.defer import succeed - from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController + from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController from Foundation import NSMakeRect - from AppKit import NSTextView, NSScrollView + from AppKit import NSTextView, NSScrollView except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted, Foolscap and PyObjC") + # This tells twisted.trial to skip this module if PyObjC is not found + skip = True -class TestIPythonCocoaControler(DeferredTestCase): +#--------------------------------------------------------------------------- +# Tests +#--------------------------------------------------------------------------- +class TestIPythonCocoaControler(unittest.TestCase): """Tests for IPythonCocoaController""" - + def setUp(self): self.controller = IPythonCocoaController.alloc().init() self.engine = es.EngineService() self.engine.startService() - + def tearDown(self): self.controller = None self.engine.stopService() - + def testControllerExecutesCode(self): code ="""5+5""" expected = Interpreter().execute(code) @@ -47,48 +55,46 @@ class TestIPythonCocoaControler(DeferredTestCase): del result['number'] del result['id'] return result - self.assertDeferredEquals( - self.controller.execute(code).addCallback(removeNumberAndID), - expected) - + d = self.controller.execute(code) + d.addCallback(removeNumberAndID) + d.addCallback(lambda r: self.assertEquals(r, expected)) + def testControllerMirrorsUserNSWithValuesAsStrings(self): code = """userns1=1;userns2=2""" def testControllerUserNS(result): self.assertEquals(self.controller.userNS['userns1'], 1) self.assertEquals(self.controller.userNS['userns2'], 2) - self.controller.execute(code).addCallback(testControllerUserNS) - - + def testControllerInstantiatesIEngine(self): self.assert_(es.IEngineBase.providedBy(self.controller.engine)) - + def testControllerCompletesToken(self): code = """longNameVariable=10""" def testCompletes(result): self.assert_("longNameVariable" in result) - + def testCompleteToken(result): self.controller.complete("longNa").addCallback(testCompletes) - + self.controller.execute(code).addCallback(testCompletes) - - + + def testCurrentIndent(self): """test that current_indent_string returns current indent or None. Uses _indent_for_block for direct unit testing. """ - + self.controller.tabUsesSpaces = True self.assert_(self.controller._indent_for_block("""a=3""") == None) self.assert_(self.controller._indent_for_block("") == None) block = """def test():\n a=3""" self.assert_(self.controller._indent_for_block(block) == \ ' ' * self.controller.tabSpaces) - + block = """if(True):\n%sif(False):\n%spass""" % \ (' '*self.controller.tabSpaces, 2*' '*self.controller.tabSpaces) self.assert_(self.controller._indent_for_block(block) == \ 2*(' '*self.controller.tabSpaces)) - + diff --git a/IPython/frontend/tests/test_asyncfrontendbase.py b/IPython/frontend/tests/test_asyncfrontendbase.py index b3ed0e6..fb497c8 100644 --- a/IPython/frontend/tests/test_asyncfrontendbase.py +++ b/IPython/frontend/tests/test_asyncfrontendbase.py @@ -15,16 +15,14 @@ __docformat__ = "restructuredtext en" # Imports #--------------------------------------------------------------------------- +# Tell nose to skip this module +__test__ = {} -try: - from twisted.trial import unittest - from IPython.frontend.asyncfrontendbase import AsyncFrontEndBase - from IPython.frontend import frontendbase - from IPython.kernel.engineservice import EngineService - from IPython.testing.parametric import Parametric, parametric -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") +from twisted.trial import unittest +from IPython.frontend.asyncfrontendbase import AsyncFrontEndBase +from IPython.frontend import frontendbase +from IPython.kernel.engineservice import EngineService +from IPython.testing.parametric import Parametric, parametric class FrontEndCallbackChecker(AsyncFrontEndBase): diff --git a/IPython/frontend/tests/test_process.py b/IPython/frontend/tests/test_process.py index f0f607c..0b7adf8 100644 --- a/IPython/frontend/tests/test_process.py +++ b/IPython/frontend/tests/test_process.py @@ -5,12 +5,12 @@ Test process execution and IO redirection. __docformat__ = "restructuredtext en" -#------------------------------------------------------------------------------- -# Copyright (C) 2008 The IPython Development Team +#----------------------------------------------------------------------------- +# Copyright (C) 2008-2009 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is # in the file COPYING, distributed as part of this software. -#------------------------------------------------------------------------------- +#----------------------------------------------------------------------------- from cStringIO import StringIO from time import sleep diff --git a/IPython/kernel/core/tests/test_interpreter.py b/IPython/kernel/core/tests/test_interpreter.py index 5fa68cf..0db9a13 100644 --- a/IPython/kernel/core/tests/test_interpreter.py +++ b/IPython/kernel/core/tests/test_interpreter.py @@ -22,6 +22,9 @@ from IPython.kernel.core.interpreter import Interpreter # Tests #----------------------------------------------------------------------------- +# Tell nose to skip this module +__test__ = {} + class TestInterpreter(unittest.TestCase): def test_unicode(self): diff --git a/IPython/kernel/core/tests/test_notification.py b/IPython/kernel/core/tests/test_notification.py index 07d9286..255da35 100644 --- a/IPython/kernel/core/tests/test_notification.py +++ b/IPython/kernel/core/tests/test_notification.py @@ -15,6 +15,9 @@ __docformat__ = "restructuredtext en" # Imports #----------------------------------------------------------------------------- +# Tell nose to skip this module +__test__ = {} + import unittest import IPython.kernel.core.notification as notification from nose.tools import timed diff --git a/IPython/kernel/core/tests/test_redirectors.py b/IPython/kernel/core/tests/test_redirectors.py index 81aa0ba..5b5c6f3 100644 --- a/IPython/kernel/core/tests/test_redirectors.py +++ b/IPython/kernel/core/tests/test_redirectors.py @@ -12,12 +12,12 @@ __docformat__ = "restructuredtext en" # in the file COPYING, distributed as part of this software. #------------------------------------------------------------------------------- +# Tell nose to skip this module +__test__ = {} -# Stdlib imports import os from cStringIO import StringIO -# Our own imports from IPython.testing import decorators as dec #----------------------------------------------------------------------------- diff --git a/IPython/kernel/core/ultraTB.py b/IPython/kernel/core/ultraTB.py index 58b2978..c76aa25 100644 --- a/IPython/kernel/core/ultraTB.py +++ b/IPython/kernel/core/ultraTB.py @@ -268,6 +268,8 @@ def _formatTracebackLines(lnum, index, lines, Colors, lvals=None,scheme=None): # This lets us get fully syntax-highlighted tracebacks. if scheme is None: try: + # Again, reference to a global __IPYTHON__ that doesn't exist. + # XXX scheme = __IPYTHON__.rc.colors except: scheme = DEFAULT_SCHEME @@ -489,7 +491,7 @@ class ListTB(TBTools): # This is being commented out for now as the __IPYTHON__ variable # referenced here is not resolved and causes massive test failures - # and errors. B. Granger, 04/2009. + # and errors. B. Granger, 04/2009. XXX # See https://bugs.launchpad.net/bugs/362137 # # vds:>> # if have_filedata: @@ -810,7 +812,7 @@ class VerboseTB(TBTools): # This is being commented out for now as the __IPYTHON__ variable # referenced here is not resolved and causes massive test failures - # and errors. B. Granger, 04/2009. + # and errors. B. Granger, 04/2009. XXX # See https://bugs.launchpad.net/bugs/362137 # # vds: >> # if records: diff --git a/IPython/kernel/scripts/ipcluster.py b/IPython/kernel/scripts/ipcluster.py index 2347e1a..dcebf04 100755 --- a/IPython/kernel/scripts/ipcluster.py +++ b/IPython/kernel/scripts/ipcluster.py @@ -29,8 +29,12 @@ from twisted.python import failure, log from IPython.external import argparse from IPython.external import Itpl -from IPython.genutils import get_ipython_dir, get_log_dir, get_security_dir -from IPython.genutils import num_cpus +from IPython.genutils import ( + get_ipython_dir, + get_log_dir, + get_security_dir, + num_cpus +) from IPython.kernel.fcutil import have_crypto # Create various ipython directories if they don't exist. @@ -485,6 +489,7 @@ class SSHEngineSet(object): def check_security(args, cont_args): + """Check to see if we should run with SSL support.""" if (not args.x or not args.y) and not have_crypto: log.err(""" OpenSSL/pyOpenSSL is not available, so we can't run in secure mode. @@ -499,6 +504,7 @@ Try running ipcluster with the -xy flags: ipcluster local -xy -n 4""") def check_reuse(args, cont_args): + """Check to see if we should try to resuse FURL files.""" if args.r: cont_args.append('-r') if args.client_port == 0 or args.engine_port == 0: @@ -513,11 +519,13 @@ the --client-port and --engine-port options.""") def _err_and_stop(f): + """Errback to log a failure and halt the reactor on a fatal error.""" log.err(f) reactor.stop() def _delay_start(cont_pid, start_engines, furl_file, reuse): + """Wait for controller to create FURL files and the start the engines.""" if not reuse: if os.path.isfile(furl_file): os.unlink(furl_file) @@ -728,8 +736,11 @@ def get_args(): parser = argparse.ArgumentParser( description='IPython cluster startup. This starts a controller and\ - engines using various approaches. THIS IS A TECHNOLOGY PREVIEW AND\ - THE API WILL CHANGE SIGNIFICANTLY BEFORE THE FINAL RELEASE.' + engines using various approaches. Use the IPYTHONDIR environment\ + variable to change your IPython directory from the default of\ + .ipython or _ipython. The log and security subdirectories of your\ + IPython directory will be used by this script for log files and\ + security files.' ) subparsers = parser.add_subparsers( help='available cluster types. For help, do "ipcluster TYPE --help"') diff --git a/IPython/kernel/scripts/ipcontroller.py b/IPython/kernel/scripts/ipcontroller.py index 7f23949..496b139 100755 --- a/IPython/kernel/scripts/ipcontroller.py +++ b/IPython/kernel/scripts/ipcontroller.py @@ -21,9 +21,10 @@ __docformat__ = "restructuredtext en" import sys sys.path.insert(0, '') -import sys, time, os -import tempfile from optparse import OptionParser +import os +import time +import tempfile from twisted.application import internet, service from twisted.internet import reactor, error, defer @@ -263,7 +264,14 @@ def init_config(): Initialize the configuration using default and command line options. """ - parser = OptionParser() + parser = OptionParser("""ipcontroller [options] + +Start an IPython controller. + +Use the IPYTHONDIR environment variable to change your IPython directory +from the default of .ipython or _ipython. The log and security +subdirectories of your IPython directory will be used by this script +for log files and security files.""") # Client related options parser.add_option( diff --git a/IPython/kernel/scripts/ipengine.py b/IPython/kernel/scripts/ipengine.py index f23264a..a70ec6a 100755 --- a/IPython/kernel/scripts/ipengine.py +++ b/IPython/kernel/scripts/ipengine.py @@ -21,8 +21,8 @@ __docformat__ = "restructuredtext en" import sys sys.path.insert(0, '') -import sys, os from optparse import OptionParser +import os from twisted.application import service from twisted.internet import reactor @@ -140,7 +140,14 @@ def init_config(): Initialize the configuration using default and command line options. """ - parser = OptionParser() + parser = OptionParser("""ipengine [options] + +Start an IPython engine. + +Use the IPYTHONDIR environment variable to change your IPython directory +from the default of .ipython or _ipython. The log and security +subdirectories of your IPython directory will be used by this script +for log files and security files.""") parser.add_option( "--furl-file", diff --git a/IPython/kernel/tests/test_contexts.py b/IPython/kernel/tests/test_contexts.py index 2ef2dec..fe726c3 100644 --- a/IPython/kernel/tests/test_contexts.py +++ b/IPython/kernel/tests/test_contexts.py @@ -1,3 +1,6 @@ +# Tell nose to skip this module +__test__ = {} + #from __future__ import with_statement # XXX This file is currently disabled to preserve 2.4 compatibility. diff --git a/IPython/kernel/tests/test_controllerservice.py b/IPython/kernel/tests/test_controllerservice.py index 21f30b3..749fac7 100644 --- a/IPython/kernel/tests/test_controllerservice.py +++ b/IPython/kernel/tests/test_controllerservice.py @@ -23,15 +23,15 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - from twisted.application.service import IService - from IPython.kernel.controllerservice import ControllerService - from IPython.kernel.tests import multienginetest as met - from controllertest import IControllerCoreTestCase - from IPython.testing.util import DeferredTestCase -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") +# Tell nose to skip this module +__test__ = {} + +from twisted.application.service import IService +from IPython.kernel.controllerservice import ControllerService +from IPython.kernel.tests import multienginetest as met +from controllertest import IControllerCoreTestCase +from IPython.testing.util import DeferredTestCase + class BasicControllerServiceTest(DeferredTestCase, IControllerCoreTestCase): diff --git a/IPython/kernel/tests/test_enginefc.py b/IPython/kernel/tests/test_enginefc.py index b8d0caf..502b421 100644 --- a/IPython/kernel/tests/test_enginefc.py +++ b/IPython/kernel/tests/test_enginefc.py @@ -15,30 +15,29 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - from twisted.python import components - from twisted.internet import reactor, defer - from twisted.spread import pb - from twisted.internet.base import DelayedCall - DelayedCall.debug = True +# Tell nose to skip this module +__test__ = {} - import zope.interface as zi +from twisted.python import components +from twisted.internet import reactor, defer +from twisted.spread import pb +from twisted.internet.base import DelayedCall +DelayedCall.debug = True - from IPython.kernel.fcutil import Tub, UnauthenticatedTub - from IPython.kernel import engineservice as es - from IPython.testing.util import DeferredTestCase - from IPython.kernel.controllerservice import IControllerBase - from IPython.kernel.enginefc import FCRemoteEngineRefFromService, IEngineBase - from IPython.kernel.engineservice import IEngineQueued - from IPython.kernel.engineconnector import EngineConnector - - from IPython.kernel.tests.engineservicetest import \ - IEngineCoreTestCase, \ - IEngineSerializedTestCase, \ - IEngineQueuedTestCase -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") +import zope.interface as zi + +from IPython.kernel.fcutil import Tub, UnauthenticatedTub +from IPython.kernel import engineservice as es +from IPython.testing.util import DeferredTestCase +from IPython.kernel.controllerservice import IControllerBase +from IPython.kernel.enginefc import FCRemoteEngineRefFromService, IEngineBase +from IPython.kernel.engineservice import IEngineQueued +from IPython.kernel.engineconnector import EngineConnector + +from IPython.kernel.tests.engineservicetest import \ + IEngineCoreTestCase, \ + IEngineSerializedTestCase, \ + IEngineQueuedTestCase class EngineFCTest(DeferredTestCase, diff --git a/IPython/kernel/tests/test_engineservice.py b/IPython/kernel/tests/test_engineservice.py index 22a47eb..a455030 100644 --- a/IPython/kernel/tests/test_engineservice.py +++ b/IPython/kernel/tests/test_engineservice.py @@ -23,20 +23,19 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - from twisted.internet import defer - from twisted.application.service import IService - - from IPython.kernel import engineservice as es - from IPython.testing.util import DeferredTestCase - from IPython.kernel.tests.engineservicetest import \ - IEngineCoreTestCase, \ - IEngineSerializedTestCase, \ - IEngineQueuedTestCase, \ - IEnginePropertiesTestCase -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") +# Tell nose to skip this module +__test__ = {} + +from twisted.internet import defer +from twisted.application.service import IService + +from IPython.kernel import engineservice as es +from IPython.testing.util import DeferredTestCase +from IPython.kernel.tests.engineservicetest import \ + IEngineCoreTestCase, \ + IEngineSerializedTestCase, \ + IEngineQueuedTestCase, \ + IEnginePropertiesTestCase class BasicEngineServiceTest(DeferredTestCase, diff --git a/IPython/kernel/tests/test_multiengine.py b/IPython/kernel/tests/test_multiengine.py index 08ca5f5..3fe397f 100644 --- a/IPython/kernel/tests/test_multiengine.py +++ b/IPython/kernel/tests/test_multiengine.py @@ -15,18 +15,17 @@ __docformat__ = "restructuredtext en" # Imports #----------------------------------------------------------------------------- -try: - from twisted.internet import defer - from IPython.testing.util import DeferredTestCase - from IPython.kernel.controllerservice import ControllerService - from IPython.kernel import multiengine as me - from IPython.kernel.tests.multienginetest import (IMultiEngineTestCase, - ISynchronousMultiEngineTestCase) -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") - - +# Tell nose to skip this module +__test__ = {} + +from twisted.internet import defer +from IPython.testing.util import DeferredTestCase +from IPython.kernel.controllerservice import ControllerService +from IPython.kernel import multiengine as me +from IPython.kernel.tests.multienginetest import (IMultiEngineTestCase, + ISynchronousMultiEngineTestCase) + + class BasicMultiEngineTestCase(DeferredTestCase, IMultiEngineTestCase): def setUp(self): diff --git a/IPython/kernel/tests/test_multienginefc.py b/IPython/kernel/tests/test_multienginefc.py index de24c4c..97d69e1 100644 --- a/IPython/kernel/tests/test_multienginefc.py +++ b/IPython/kernel/tests/test_multienginefc.py @@ -14,25 +14,25 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - from twisted.internet import defer, reactor +# Tell nose to skip this module +__test__ = {} + +from twisted.internet import defer, reactor + +from IPython.kernel.fcutil import Tub, UnauthenticatedTub + +from IPython.testing.util import DeferredTestCase +from IPython.kernel.controllerservice import ControllerService +from IPython.kernel.multiengine import IMultiEngine +from IPython.kernel.tests.multienginetest import IFullSynchronousMultiEngineTestCase +from IPython.kernel.multienginefc import IFCSynchronousMultiEngine +from IPython.kernel import multiengine as me +from IPython.kernel.clientconnector import ClientConnector +from IPython.kernel.parallelfunction import ParallelFunction +from IPython.kernel.error import CompositeError +from IPython.kernel.util import printer - from IPython.kernel.fcutil import Tub, UnauthenticatedTub - from IPython.testing.util import DeferredTestCase - from IPython.kernel.controllerservice import ControllerService - from IPython.kernel.multiengine import IMultiEngine - from IPython.kernel.tests.multienginetest import IFullSynchronousMultiEngineTestCase - from IPython.kernel.multienginefc import IFCSynchronousMultiEngine - from IPython.kernel import multiengine as me - from IPython.kernel.clientconnector import ClientConnector - from IPython.kernel.parallelfunction import ParallelFunction - from IPython.kernel.error import CompositeError - from IPython.kernel.util import printer -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") - def _raise_it(f): try: f.raiseException() diff --git a/IPython/kernel/tests/test_newserialized.py b/IPython/kernel/tests/test_newserialized.py index 0a9d460..57b6d7b 100644 --- a/IPython/kernel/tests/test_newserialized.py +++ b/IPython/kernel/tests/test_newserialized.py @@ -15,21 +15,21 @@ __docformat__ = "restructuredtext en" # Imports #----------------------------------------------------------------------------- -try: - import zope.interface as zi - from twisted.trial import unittest - from IPython.testing.util import DeferredTestCase +# Tell nose to skip this module +__test__ = {} + +import zope.interface as zi +from twisted.trial import unittest +from IPython.testing.util import DeferredTestCase + +from IPython.kernel.newserialized import \ + ISerialized, \ + IUnSerialized, \ + Serialized, \ + UnSerialized, \ + SerializeIt, \ + UnSerializeIt - from IPython.kernel.newserialized import \ - ISerialized, \ - IUnSerialized, \ - Serialized, \ - UnSerialized, \ - SerializeIt, \ - UnSerializeIt -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") #----------------------------------------------------------------------------- # Tests diff --git a/IPython/kernel/tests/test_pendingdeferred.py b/IPython/kernel/tests/test_pendingdeferred.py index 73d3b84..e12b56b 100644 --- a/IPython/kernel/tests/test_pendingdeferred.py +++ b/IPython/kernel/tests/test_pendingdeferred.py @@ -16,18 +16,18 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - from twisted.internet import defer - from twisted.python import failure - - from IPython.testing.util import DeferredTestCase - import IPython.kernel.pendingdeferred as pd - from IPython.kernel import error - from IPython.kernel.util import printer -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") - +# Tell nose to skip this module +__test__ = {} + +from twisted.internet import defer +from twisted.python import failure + +from IPython.testing.util import DeferredTestCase +import IPython.kernel.pendingdeferred as pd +from IPython.kernel import error +from IPython.kernel.util import printer + + class Foo(object): def bar(self, bahz): diff --git a/IPython/kernel/tests/test_task.py b/IPython/kernel/tests/test_task.py index face815..7060579 100644 --- a/IPython/kernel/tests/test_task.py +++ b/IPython/kernel/tests/test_task.py @@ -15,19 +15,19 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - import time - - from twisted.internet import defer - from twisted.trial import unittest - - from IPython.kernel import task, controllerservice as cs, engineservice as es - from IPython.kernel.multiengine import IMultiEngine - from IPython.testing.util import DeferredTestCase - from IPython.kernel.tests.tasktest import ITaskControllerTestCase -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") +# Tell nose to skip this module +__test__ = {} + +import time + +from twisted.internet import defer +from twisted.trial import unittest + +from IPython.kernel import task, controllerservice as cs, engineservice as es +from IPython.kernel.multiengine import IMultiEngine +from IPython.testing.util import DeferredTestCase +from IPython.kernel.tests.tasktest import ITaskControllerTestCase + #------------------------------------------------------------------------------- # Tests diff --git a/IPython/kernel/tests/test_taskfc.py b/IPython/kernel/tests/test_taskfc.py index 266c7fa..371d800 100644 --- a/IPython/kernel/tests/test_taskfc.py +++ b/IPython/kernel/tests/test_taskfc.py @@ -14,27 +14,26 @@ __docformat__ = "restructuredtext en" # Imports #------------------------------------------------------------------------------- -try: - import time +# Tell nose to skip this module +__test__ = {} - from twisted.internet import defer, reactor +import time - from IPython.kernel.fcutil import Tub, UnauthenticatedTub +from twisted.internet import defer, reactor - from IPython.kernel import task as taskmodule - from IPython.kernel import controllerservice as cs - import IPython.kernel.multiengine as me - from IPython.testing.util import DeferredTestCase - from IPython.kernel.multienginefc import IFCSynchronousMultiEngine - from IPython.kernel.taskfc import IFCTaskController - from IPython.kernel.util import printer - from IPython.kernel.tests.tasktest import ITaskControllerTestCase - from IPython.kernel.clientconnector import ClientConnector - from IPython.kernel.error import CompositeError - from IPython.kernel.parallelfunction import ParallelFunction -except ImportError: - import nose - raise nose.SkipTest("This test requires zope.interface, Twisted and Foolscap") +from IPython.kernel.fcutil import Tub, UnauthenticatedTub + +from IPython.kernel import task as taskmodule +from IPython.kernel import controllerservice as cs +import IPython.kernel.multiengine as me +from IPython.testing.util import DeferredTestCase +from IPython.kernel.multienginefc import IFCSynchronousMultiEngine +from IPython.kernel.taskfc import IFCTaskController +from IPython.kernel.util import printer +from IPython.kernel.tests.tasktest import ITaskControllerTestCase +from IPython.kernel.clientconnector import ClientConnector +from IPython.kernel.error import CompositeError +from IPython.kernel.parallelfunction import ParallelFunction #------------------------------------------------------------------------------- diff --git a/IPython/kernel/tests/test_twistedutil.py b/IPython/kernel/tests/test_twistedutil.py index 8e84053..9838ff3 100644 --- a/IPython/kernel/tests/test_twistedutil.py +++ b/IPython/kernel/tests/test_twistedutil.py @@ -12,6 +12,9 @@ # Imports #----------------------------------------------------------------------------- +# Tell nose to skip this module +__test__ = {} + import tempfile import os, sys diff --git a/IPython/testing/decorators.py b/IPython/testing/decorators.py index 5d588a0..10eefd4 100644 --- a/IPython/testing/decorators.py +++ b/IPython/testing/decorators.py @@ -123,10 +123,10 @@ def skipif(skip_condition, msg=None): Parameters ---------- skip_condition : bool or callable. - Flag to determine whether to skip test. If the condition is a - callable, it is used at runtime to dynamically make the decision. This - is useful for tests that may require costly imports, to delay the cost - until the test suite is actually executed. + Flag to determine whether to skip test. If the condition is a + callable, it is used at runtime to dynamically make the decision. This + is useful for tests that may require costly imports, to delay the cost + until the test suite is actually executed. msg : string Message to give on raising a SkipTest exception diff --git a/docs/source/parallel/parallel_process.txt b/docs/source/parallel/parallel_process.txt index d943b56..c91d5d6 100644 --- a/docs/source/parallel/parallel_process.txt +++ b/docs/source/parallel/parallel_process.txt @@ -309,7 +309,7 @@ you want to unlock the door and enter your house. As with your house, you want to be able to create the key (or FURL file) once, and then simply use it at any point in the future. -This is possible. but before you do this, you **must** remove any old FURL +This is possible, but before you do this, you **must** remove any old FURL files in the :file:`~/.ipython/security` directory. .. warning::