mirror of
https://github.com/jupyter/notebook.git
synced 2025-04-06 13:50:29 +08:00
Removed Twisted related things from setup scripts and testing.
This commit is contained in:
parent
1205d8f66e
commit
527aa15f84
@ -5,15 +5,13 @@ 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
|
||||
calling this script (with different arguments) 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.
|
||||
"""
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -101,9 +99,6 @@ have = {}
|
||||
have['curses'] = test_for('_curses')
|
||||
have['wx'] = test_for('wx')
|
||||
have['wx.aui'] = test_for('wx.aui')
|
||||
have['zope.interface'] = test_for('zope.interface')
|
||||
have['twisted'] = test_for('twisted')
|
||||
have['foolscap'] = test_for('foolscap')
|
||||
have['pexpect'] = test_for('pexpect')
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -183,16 +178,6 @@ def make_exclude():
|
||||
exclusions.extend([ipjoin('scripts', 'irunner'),
|
||||
ipjoin('lib', 'irunner')])
|
||||
|
||||
# This is scary. We still have things in frontend and testing that
|
||||
# are being tested by nose that use twisted. We need to rethink
|
||||
# how we are isolating dependencies in testing.
|
||||
if not (have['twisted'] and have['zope.interface'] and have['foolscap']):
|
||||
exclusions.extend(
|
||||
[ipjoin('testing', 'parametric'),
|
||||
ipjoin('testing', 'util'),
|
||||
ipjoin('testing', 'tests', 'test_decorators_trial'),
|
||||
] )
|
||||
|
||||
# This is needed for the reg-exp to match on win32 in the ipdoctest plugin.
|
||||
if sys.platform == 'win32':
|
||||
exclusions = [s.replace('\\','\\\\') for s in exclusions]
|
||||
@ -218,9 +203,6 @@ class IPTester(object):
|
||||
if runner == 'iptest':
|
||||
iptest_app = get_ipython_module_path('IPython.testing.iptest')
|
||||
self.runner = pycmd2argv(iptest_app) + sys.argv[1:]
|
||||
elif runner == 'trial':
|
||||
# For trial, it needs to be installed system-wide
|
||||
self.runner = pycmd2argv(p.abspath(find_cmd('trial')))
|
||||
else:
|
||||
raise Exception('Not a valid test runner: %s' % repr(runner))
|
||||
if params is None:
|
||||
@ -291,27 +273,15 @@ def make_runners():
|
||||
# Packages to be tested via nose, that only depend on the stdlib
|
||||
nose_pkg_names = ['config', 'core', 'extensions', 'frontend', 'lib',
|
||||
'scripts', 'testing', 'utils' ]
|
||||
# The machinery in kernel needs twisted for real testing
|
||||
trial_pkg_names = []
|
||||
|
||||
# And add twisted ones if conditions are met
|
||||
if have['zope.interface'] and have['twisted'] and have['foolscap']:
|
||||
# We only list IPython.kernel for testing using twisted.trial as
|
||||
# nose and twisted.trial have conflicts that make the testing system
|
||||
# unstable.
|
||||
trial_pkg_names.append('kernel')
|
||||
|
||||
# For debugging this code, only load quick stuff
|
||||
#nose_pkg_names = ['core', 'extensions'] # dbg
|
||||
#trial_pkg_names = [] # dbg
|
||||
|
||||
# Make fully qualified package names prepending 'IPython.' to our name lists
|
||||
nose_packages = ['IPython.%s' % m for m in nose_pkg_names ]
|
||||
trial_packages = ['IPython.%s' % m for m in trial_pkg_names ]
|
||||
|
||||
# Make runners
|
||||
runners = [ (v, IPTester('iptest', params=v)) for v in nose_packages ]
|
||||
runners.extend([ (v, IPTester('trial', params=v)) for v in trial_packages ])
|
||||
|
||||
return runners
|
||||
|
||||
|
5
setup.py
5
setup.py
@ -223,11 +223,6 @@ if 'setuptools' in sys.modules:
|
||||
]
|
||||
}
|
||||
setup_args['extras_require'] = dict(
|
||||
kernel = [
|
||||
'zope.interface>=3.4.1',
|
||||
'Twisted>=8.0.1',
|
||||
'foolscap>=0.2.6'
|
||||
],
|
||||
doc='Sphinx>=0.3',
|
||||
test='nose>=0.10.1',
|
||||
security='pyOpenSSL>=0.6'
|
||||
|
@ -123,8 +123,6 @@ def find_packages():
|
||||
add_package(packages, 'frontend.qt')
|
||||
add_package(packages, 'frontend.qt.console', tests=True)
|
||||
add_package(packages, 'frontend.terminal', tests=True)
|
||||
add_package(packages, 'kernel', config=False, tests=True, scripts=True)
|
||||
add_package(packages, 'kernel.core', config=False, tests=True)
|
||||
add_package(packages, 'lib', tests=True)
|
||||
add_package(packages, 'quarantine', tests=True)
|
||||
add_package(packages, 'scripts')
|
||||
|
Loading…
x
Reference in New Issue
Block a user