From 97d2d0f72ebc0610d957610308dcf87627a38f9e Mon Sep 17 00:00:00 2001 From: Gael Varoquaux Date: Mon, 20 Apr 2009 23:25:20 +0200 Subject: [PATCH 01/12] Take in account remarks by Fernando on code review --- setupbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setupbase.py b/setupbase.py index cd7564452..9c00a35d3 100644 --- a/setupbase.py +++ b/setupbase.py @@ -109,7 +109,7 @@ def find_packages(): add_package(packages, 'gui') add_package(packages, 'gui.wx') add_package(packages, 'frontend', tests=True) - add_package(packages, 'frontend._process') + add_package(packages, 'frontend.process') add_package(packages, 'frontend.wx') add_package(packages, 'frontend.cocoa', tests=True) add_package(packages, 'kernel', config=True, tests=True, scripts=True) From 32edd98fbd1e09ef6b55d631b637fa31a9432c4a Mon Sep 17 00:00:00 2001 From: Fernando Perez Date: Wed, 22 Apr 2009 16:34:16 -0700 Subject: [PATCH 02/12] Skip things we shouldn't be testing --- IPython/testing/iptest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 50f9beedb..ab20e84af 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -35,12 +35,15 @@ from IPython.testing.plugin.ipdoctest import IPythonDoctest EXCLUDE = ['IPython/external/', 'IPython/platutils_win32', 'IPython/frontend/cocoa', + 'IPython/frontend/process/winprocess.py', 'IPython_doctest_plugin', 'IPython/Gnuplot', 'IPython/Extensions/ipy_', 'IPython/Extensions/clearcmd', 'IPython/Extensions/PhysicalQIn', 'IPython/Extensions/scitedirector', + 'IPython/Extensions/numeric_formats', + 'IPython/testing/attic', ] #----------------------------------------------------------------------------- From cdac592b4e746ea9e0e7a7553166ad18d39cc12d Mon Sep 17 00:00:00 2001 From: Fernando Perez Date: Thu, 23 Apr 2009 15:29:27 -0700 Subject: [PATCH 03/12] Reactivate --with-ipdoctest option by default, now that trial is isolated. --- IPython/testing/iptest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index ab20e84af..6bdf251d3 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -63,7 +63,7 @@ def main(): # test suite back into working shape. Our nose # plugin needs to be gone through with a fine # toothed comb to find what is causing the problem. - # '--with-ipdoctest', + '--with-ipdoctest', '--ipdoctest-tests','--ipdoctest-extension=txt', '--detailed-errors', From cbd271fb01406c083f504f1a0ca448084f70be43 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Fri, 24 Apr 2009 10:12:50 -0700 Subject: [PATCH 04/12] Refactored iptest to include the iptestall capabilities. We not have a test suite that can be run with `iptest all`. Give it a shot! --- IPython/testing/iptest.py | 165 +++++++++++++++++++++++++++++++++++--- 1 file changed, 153 insertions(+), 12 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 6bdf251d3..ecad646c9 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -1,31 +1,39 @@ # -*- coding: utf-8 -*- """IPython Test Suite Runner. -This module provides a main entry point to a user script to test IPython itself -from the command line. The main() routine can be used in a similar manner to -the ``nosetests`` script, and it takes similar arguments, but if no arguments -are given it defaults to testing all of IPython. This should be preferred to -using plain ``nosetests`` because a number of nose plugins necessary to test -IPython correctly are automatically configured by this code. +This module provides a main entry point to a user script to test IPython +itself from the command line. There are two ways of running this script: + +1. With the syntax `iptest all`. This runs our entire test suite by + calling this script (with different arguments) or trial recursively. This + causes modules and package to be tested in different processes, using nose + or trial where appropriate. +2. With the regular nose syntax, like `iptest -vvs IPython`. In this form + the script simply calls nose, but with special command line flags and + plugins loaded. + +For now, this script requires that both nose and twisted are installed. This +will change in the future. """ #----------------------------------------------------------------------------- # Module imports #----------------------------------------------------------------------------- -# stdlib +import os +import os.path as path import sys +import subprocess +import time import warnings -# third-party import nose.plugins.builtin from nose.core import TestProgram -# Our own imports from IPython.testing.plugin.ipdoctest import IPythonDoctest #----------------------------------------------------------------------------- -# Constants and globals +# Globals and constants #----------------------------------------------------------------------------- # For the IPythonDoctest plugin, we need to exclude certain patterns that cause @@ -50,8 +58,12 @@ EXCLUDE = ['IPython/external/', # Functions and classes #----------------------------------------------------------------------------- -def main(): - """Run the IPython test suite. +def run_iptest(): + """Run the IPython test suite using nose. + + This function is called when this script is **not** called with the form + `iptest all`. It simply calls nose with appropriate command line flags + and accepts all of the standard nose arguments. """ warnings.filterwarnings('ignore', @@ -101,3 +113,132 @@ def main(): plugins.append(plug) TestProgram(argv=argv,plugins=plugins) + + +class IPTester(object): + """Call that calls iptest or trial in a subprocess. + """ + def __init__(self,runner='iptest',params=None): + """ """ + if runner == 'iptest': + self.runner = ['iptest','-v'] + else: + self.runner = ['trial'] + if params is None: + params = [] + if isinstance(params,str): + params = [params] + self.params = params + + # Assemble call + self.call_args = self.runner+self.params + + def run(self): + """Run the stored commands""" + return subprocess.call(self.call_args) + + +def make_runners(): + """Define the modules and packages that need to be tested. + """ + + # This omits additional top-level modules that should not be doctested. + # XXX: Shell.py is also ommited because of a bug in the skip_doctest + # decorator. See ticket https://bugs.launchpad.net/bugs/366209 + top_mod = \ + ['background_jobs.py', 'ColorANSI.py', 'completer.py', 'ConfigLoader.py', + 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', + 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', + 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', + 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'irunner.py', 'Itpl.py', + 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py', + 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', + 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', + 'shellglobals.py', 'strdispatch.py', 'twshell.py', + 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', + # See note above for why this is skipped + # 'Shell.py', + 'winconsole.py'] + + if os.name == 'posix': + top_mod.append('platutils_posix.py') + elif sys.platform == 'win32': + top_mod.append('platutils_win32.py') + else: + top_mod.append('platutils_dummy.py') + + top_pack = ['config','Extensions','frontend','gui','kernel', + 'testing','tests','tools','UserConfig'] + + modules = ['IPython.%s' % m[:-3] for m in top_mod ] + packages = ['IPython.%s' % m for m in top_pack ] + + # Make runners + runners = dict(zip(top_pack, [IPTester(params=v) for v in packages])) + + try: + import zope.interface + import twisted + import foolscap + except ImportError: + pass + else: + runners['trial'] = IPTester('trial',['IPython']) + + for m in modules: + runners[m] = IPTester(params=m) + + return runners + + +def run_iptestall(): + """Run the entire IPython test suite by calling nose and trial. + + This function constructs :class:`IPTester` instances for all IPython + modules and package and then runs each of them. This causes the modules + and packages of IPython to be tested each in their own subprocess using + nose or twisted.trial appropriately. + """ + runners = make_runners() + # Run all test runners, tracking execution time + failed = {} + t_start = time.time() + for name,runner in runners.iteritems(): + print '*'*77 + print 'IPython test set:',name + res = runner.run() + if res: + failed[name] = res + t_end = time.time() + t_tests = t_end - t_start + nrunners = len(runners) + nfail = len(failed) + # summarize results + print + print '*'*77 + print 'Ran %s test sets in %.3fs' % (nrunners, t_tests) + print + if not failed: + print 'OK' + else: + # If anything went wrong, point out what command to rerun manually to + # see the actual errors and individual summary + print 'ERROR - %s out of %s test sets failed.' % (nfail, nrunners) + for name in failed: + failed_runner = runners[name] + print '-'*40 + print 'Runner failed:',name + print 'You may wish to rerun this one individually, with:' + print ' '.join(failed_runner.call_args) + print + + +def main(): + if sys.argv[1] == 'all': + run_iptestall() + else: + run_iptest() + + +if __name__ == '__main__': + main() \ No newline at end of file From 055c6cdcde30a89c750c426603cfd819b6e4a31e Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Fri, 24 Apr 2009 11:04:32 -0700 Subject: [PATCH 05/12] Run the top level module tests in a single process. --- IPython/testing/iptest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index a76f0ce27..263b293cd 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -176,7 +176,7 @@ def make_runners(): # Make runners runners = dict(zip(top_pack, [IPTester(params=v) for v in packages])) - + # Test IPython.kernel using trial if twisted is installed try: import zope.interface @@ -187,8 +187,7 @@ def make_runners(): else: runners['trial'] = IPTester('trial',['IPython']) - for m in modules: - runners[m] = IPTester(params=m) + runners['modules'] = IPTester(params=modules) return runners From 44f17cc75f4c384fb5d5c6e6c3c5b9e67c6f3a02 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Sat, 25 Apr 2009 09:04:56 -0700 Subject: [PATCH 06/12] Making the doctest exclude paths os independent. --- IPython/testing/iptest.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 263b293cd..32885b222 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -32,6 +32,8 @@ from nose.core import TestProgram from IPython.testing.plugin.ipdoctest import IPythonDoctest +pjoin = path.join + #----------------------------------------------------------------------------- # Globals and constants #----------------------------------------------------------------------------- @@ -40,18 +42,18 @@ from IPython.testing.plugin.ipdoctest import IPythonDoctest # testing problems. We should strive to minimize the number of skipped # modules, since this means untested code. As the testing machinery # solidifies, this list should eventually become empty. -EXCLUDE = ['IPython/external/', - 'IPython/platutils_win32', - 'IPython/frontend/cocoa', - 'IPython/frontend/process/winprocess.py', - 'IPython_doctest_plugin', - 'IPython/Gnuplot', - 'IPython/Extensions/ipy_', - 'IPython/Extensions/clearcmd', - 'IPython/Extensions/PhysicalQIn', - 'IPython/Extensions/scitedirector', - 'IPython/Extensions/numeric_formats', - 'IPython/testing/attic', +EXCLUDE = [pjoin('IPython', 'external'), + pjoin('IPython', 'platutils_win32'), + pjoin('IPython', 'frontend', 'cocoa'), + pjoin('IPython', 'frontend', 'process', 'winprocess.py'), + pjoin('IPython_doctest_plugin'), + pjoin('IPython', 'Gnuplot'), + pjoin('IPython', 'Extensions', 'ipy_'), + pjoin('IPython', 'Extensions', 'clearcmd'), + pjoin('IPython', 'Extensions', 'PhysicalQIn'), + pjoin('IPython', 'Extensions', 'scitedirector'), + pjoin('IPython', 'Extensions', 'numeric_formats'), + pjoin('IPython', 'testing', 'attic'), ] #----------------------------------------------------------------------------- From f4d078c8beed53ef86d87f647869f2ff81b70254 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 25 Apr 2009 10:05:09 -0700 Subject: [PATCH 07/12] Fixing doctest EXCLUDES in iptest on win32. The regular expressions we were using on win32 were not matching. The trick is to construct the regular expression with double \\ like this:: re.compile('foo\\\\bar') Arggg!! --- IPython/testing/iptest.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 32885b222..f5f760586 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -30,6 +30,7 @@ import warnings import nose.plugins.builtin from nose.core import TestProgram +from IPython.platutils import find_cmd from IPython.testing.plugin.ipdoctest import IPythonDoctest pjoin = path.join @@ -43,6 +44,7 @@ pjoin = path.join # modules, since this means untested code. As the testing machinery # solidifies, this list should eventually become empty. EXCLUDE = [pjoin('IPython', 'external'), + # This skip is duplicated below XXX pjoin('IPython', 'platutils_win32'), pjoin('IPython', 'frontend', 'cocoa'), pjoin('IPython', 'frontend', 'process', 'winprocess.py'), @@ -50,12 +52,28 @@ EXCLUDE = [pjoin('IPython', 'external'), pjoin('IPython', 'Gnuplot'), pjoin('IPython', 'Extensions', 'ipy_'), pjoin('IPython', 'Extensions', 'clearcmd'), - pjoin('IPython', 'Extensions', 'PhysicalQIn'), + pjoin('IPython', 'Extensions', 'PhysicalQInteractive'), pjoin('IPython', 'Extensions', 'scitedirector'), pjoin('IPython', 'Extensions', 'numeric_formats'), pjoin('IPython', 'testing', 'attic'), ] +try: + import wx +except ImportError: + EXCLUDE.append(pjoin('IPython', 'Extensions', 'igrid')) + +try: + import _curses +except ImportError: + EXCLUDE.append(pjoin('IPython', 'Extensions', 'ibrowse')) + + +# This is needed for the reg-exp to match on win32 in the ipdoctest plugin. +if sys.platform == 'win32': + EXCLUDE = [s.replace('\\','\\\\') for s in EXCLUDE] + + #----------------------------------------------------------------------------- # Functions and classes #----------------------------------------------------------------------------- @@ -125,7 +143,7 @@ class IPTester(object): if runner == 'iptest': self.runner = ['iptest','-v'] else: - self.runner = ['trial'] + self.runner = [find_cmd('trial')] if params is None: params = [] if isinstance(params,str): From e18c04f33aa2c841b5195d1bf0857e5fef74b9ed Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 25 Apr 2009 12:27:03 -0700 Subject: [PATCH 08/12] Fixing bugs with the testing system. --- IPython/testing/iptest.py | 67 ++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 25 deletions(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index f5f760586..078ab76d1 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -36,17 +36,31 @@ from IPython.testing.plugin.ipdoctest import IPythonDoctest pjoin = path.join #----------------------------------------------------------------------------- -# Globals and constants +# Logic for skipping doctests #----------------------------------------------------------------------------- +def test_for(mod): + """Test to see if mod is importable.""" + try: + __import__(mod) + except ImportError: + return False + else: + return True + +have_curses = test_for('_curses') +have_wx = test_for('wx') +have_zi = test_for('zope.interface') +have_twisted = test_for('twisted') +have_foolscap = test_for('foolscap') +have_objc = test_for('objc') +have_pexpect = test_for('pexpect') + # For the IPythonDoctest plugin, we need to exclude certain patterns that cause # testing problems. We should strive to minimize the number of skipped # modules, since this means untested code. As the testing machinery # solidifies, this list should eventually become empty. EXCLUDE = [pjoin('IPython', 'external'), - # This skip is duplicated below XXX - pjoin('IPython', 'platutils_win32'), - pjoin('IPython', 'frontend', 'cocoa'), pjoin('IPython', 'frontend', 'process', 'winprocess.py'), pjoin('IPython_doctest_plugin'), pjoin('IPython', 'Gnuplot'), @@ -56,18 +70,28 @@ EXCLUDE = [pjoin('IPython', 'external'), pjoin('IPython', 'Extensions', 'scitedirector'), pjoin('IPython', 'Extensions', 'numeric_formats'), pjoin('IPython', 'testing', 'attic'), + pjoin('IPython', 'testing', 'tutils') ] -try: - import wx -except ImportError: +if not have_wx: EXCLUDE.append(pjoin('IPython', 'Extensions', 'igrid')) + EXCLUDE.append(pjoin('IPython', 'gui')) + EXCLUDE.append(pjoin('IPython', 'frontend', 'wx')) -try: - import _curses -except ImportError: +if not have_objc: + EXCLUDE.append(pjoin('IPython', 'frontend', 'cocoa')) + +if not have_curses: EXCLUDE.append(pjoin('IPython', 'Extensions', 'ibrowse')) +if not sys.platform == 'win32': + EXCLUDE.append(pjoin('IPython', 'platutils_win32')) + +if not os.name == 'posix': + EXCLUDE.append(pjoin('IPython', 'platutils_posix')) + +if not have_pexpect: + EXCLUDE.append(pjoin('IPython', 'irunner')) # This is needed for the reg-exp to match on win32 in the ipdoctest plugin. if sys.platform == 'win32': @@ -170,7 +194,7 @@ def make_runners(): 'CrashHandler.py', 'Debugger.py', 'deep_reload.py', 'demo.py', 'DPyGetOpt.py', 'dtutils.py', 'excolors.py', 'FakeModule.py', 'generics.py', 'genutils.py', 'history.py', 'hooks.py', 'ipapi.py', - 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'irunner.py', 'Itpl.py', + 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', 'Logger.py', 'macro.py', 'Magic.py', 'OInspect.py', 'OutputTrap.py', 'platutils.py', 'prefilter.py', 'Prompts.py', 'PyColorize.py', 'Release.py', 'rlineimpl.py', 'shadowns.py', @@ -180,17 +204,16 @@ def make_runners(): # 'Shell.py', 'winconsole.py'] - if os.name == 'posix': - top_mod.append('platutils_posix.py') - elif sys.platform == 'win32': - top_mod.append('platutils_win32.py') - else: - top_mod.append('platutils_dummy.py') + if have_pexpect: + top_mod.append('irunner.py') # These are tested by nose, so skip IPython.kernel - top_pack = ['config','Extensions','frontend','gui', + top_pack = ['config','Extensions','frontend', 'testing','tests','tools','UserConfig'] + if have_wx: + top_pack.append('gui') + modules = ['IPython.%s' % m[:-3] for m in top_mod ] packages = ['IPython.%s' % m for m in top_pack ] @@ -198,13 +221,7 @@ def make_runners(): runners = dict(zip(top_pack, [IPTester(params=v) for v in packages])) # Test IPython.kernel using trial if twisted is installed - try: - import zope.interface - import twisted - import foolscap - except ImportError: - pass - else: + if have_zi and have_twisted and have_foolscap: runners['trial'] = IPTester('trial',['IPython']) runners['modules'] = IPTester(params=modules) From db440afb0f5cd9f82851e3d5b3cd8f8c0acec392 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Sat, 25 Apr 2009 12:50:43 -0700 Subject: [PATCH 09/12] Fixing tests in IPython.testing. --- IPython/testing/iptest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 078ab76d1..9910f42c7 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -70,7 +70,8 @@ EXCLUDE = [pjoin('IPython', 'external'), pjoin('IPython', 'Extensions', 'scitedirector'), pjoin('IPython', 'Extensions', 'numeric_formats'), pjoin('IPython', 'testing', 'attic'), - pjoin('IPython', 'testing', 'tutils') + pjoin('IPython', 'testing', 'tutils'), + pjoin('IPython', 'testing', 'tools') ] if not have_wx: From e6a9e402ff90ea66ade1436aaa30d6073b171e61 Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 25 Apr 2009 13:19:34 -0700 Subject: [PATCH 10/12] More fixes for testing on win32. --- IPython/testing/iptest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index 9910f42c7..bba6d6a54 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -71,7 +71,8 @@ EXCLUDE = [pjoin('IPython', 'external'), pjoin('IPython', 'Extensions', 'numeric_formats'), pjoin('IPython', 'testing', 'attic'), pjoin('IPython', 'testing', 'tutils'), - pjoin('IPython', 'testing', 'tools') + pjoin('IPython', 'testing', 'tools'), + pjoin('IPython', 'testing', 'mkdoctests') ] if not have_wx: @@ -88,6 +89,10 @@ if not have_curses: if not sys.platform == 'win32': EXCLUDE.append(pjoin('IPython', 'platutils_win32')) +if sys.platform == 'win32': + EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip')) + EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'dtexample')) + if not os.name == 'posix': EXCLUDE.append(pjoin('IPython', 'platutils_posix')) From f97df714607f72a86e31de8316cf4cb724408070 Mon Sep 17 00:00:00 2001 From: Brian Granger Date: Sat, 25 Apr 2009 13:50:45 -0700 Subject: [PATCH 11/12] Adding comment about ticket https://bugs.launchpad.net/bugs/366982 --- IPython/testing/iptest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index bba6d6a54..09d21b817 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -89,6 +89,8 @@ if not have_curses: if not sys.platform == 'win32': EXCLUDE.append(pjoin('IPython', 'platutils_win32')) +# These have to be skipped on win32 because the use echo, rm, cd, etc. +# See ticket https://bugs.launchpad.net/bugs/366982 if sys.platform == 'win32': EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip')) EXCLUDE.append(pjoin('IPython', 'testing', 'plugin', 'dtexample')) From ff41bf1dc674b24eab8f5709943bd8c2f10a654b Mon Sep 17 00:00:00 2001 From: Administrator Date: Sat, 25 Apr 2009 15:04:17 -0700 Subject: [PATCH 12/12] Added platutils.get_long_path_name to expand paths with "~" on win32. This might be needed to fix ticket https://bugs.launchpad.net/bugs/366353 But, there are still problems with Magic.parse_options --- IPython/testing/iptest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IPython/testing/iptest.py b/IPython/testing/iptest.py index bba6d6a54..22b7496ce 100644 --- a/IPython/testing/iptest.py +++ b/IPython/testing/iptest.py @@ -213,6 +213,13 @@ def make_runners(): if have_pexpect: top_mod.append('irunner.py') + if sys.platform == 'win32': + top_mod.append('platutils_win32.py') + elif os.name == 'posix': + top_mod.append('platutils_posix.py') + else: + top_mod.append('platutils_dummy.py') + # These are tested by nose, so skip IPython.kernel top_pack = ['config','Extensions','frontend', 'testing','tests','tools','UserConfig']