mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge with upstream
This commit is contained in:
commit
328cd734cc
53
IPython/testing/iptest.py
Normal file
53
IPython/testing/iptest.py
Normal file
@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""IPython Test Suite Runner.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from nose.core import TestProgram
|
||||
import nose.plugins.builtin
|
||||
|
||||
from IPython.testing.plugin.ipdoctest import IPythonDoctest
|
||||
|
||||
def main():
|
||||
"""Run the IPython test suite.
|
||||
"""
|
||||
|
||||
warnings.filterwarnings('ignore',
|
||||
'This will be removed soon. Use IPython.testing.util instead')
|
||||
|
||||
|
||||
# construct list of plugins, omitting the existing doctest plugin
|
||||
plugins = [IPythonDoctest()]
|
||||
for p in nose.plugins.builtin.plugins:
|
||||
plug = p()
|
||||
if plug.name == 'doctest':
|
||||
continue
|
||||
|
||||
#print 'adding plugin:',plug.name # dbg
|
||||
plugins.append(plug)
|
||||
|
||||
argv = sys.argv + ['--doctest-tests','--doctest-extension=txt',
|
||||
'--detailed-errors',
|
||||
|
||||
# We add --exe because of setuptools' imbecility (it
|
||||
# blindly does chmod +x on ALL files). Nose does the
|
||||
# right thing and it tries to avoid executables,
|
||||
# setuptools unfortunately forces our hand here. This
|
||||
# has been discussed on the distutils list and the
|
||||
# setuptools devs refuse to fix this problem!
|
||||
'--exe',
|
||||
]
|
||||
|
||||
has_ip = False
|
||||
for arg in sys.argv:
|
||||
if 'IPython' in arg:
|
||||
has_ip = True
|
||||
break
|
||||
|
||||
if not has_ip:
|
||||
argv.append('IPython')
|
||||
|
||||
TestProgram(argv=argv,plugins=plugins)
|
17
setup.py
17
setup.py
@ -137,23 +137,22 @@ if 'setuptools' in sys.modules:
|
||||
'ipcontroller = IPython.kernel.scripts.ipcontroller:main',
|
||||
'ipengine = IPython.kernel.scripts.ipengine:main',
|
||||
'ipcluster = IPython.kernel.scripts.ipcluster:main',
|
||||
'ipythonx = IPython.frontend.wx.ipythonx:main'
|
||||
'ipythonx = IPython.frontend.wx.ipythonx:main',
|
||||
'iptest = IPython.testing.iptest:main',
|
||||
]
|
||||
}
|
||||
setup_args["extras_require"] = dict(
|
||||
setup_args['extras_require'] = dict(
|
||||
kernel = [
|
||||
"zope.interface>=3.4.1",
|
||||
"Twisted>=8.0.1",
|
||||
"foolscap>=0.2.6"
|
||||
'zope.interface>=3.4.1',
|
||||
'Twisted>=8.0.1',
|
||||
'foolscap>=0.2.6'
|
||||
],
|
||||
doc=['Sphinx>=0.3','pygments'],
|
||||
doc='Sphinx>=0.3',
|
||||
test='nose>=0.10.1',
|
||||
security=["pyOpenSSL>=0.6"]
|
||||
security='pyOpenSSL>=0.6'
|
||||
)
|
||||
# Allow setuptools to handle the scripts
|
||||
scripts = []
|
||||
# eggs will lack docs, examples
|
||||
data_files = []
|
||||
else:
|
||||
# package_data of setuptools was introduced to distutils in 2.4
|
||||
cfgfiles = filter(isfile, glob('IPython/UserConfig/*'))
|
||||
|
@ -115,6 +115,7 @@ def find_packages():
|
||||
add_package(packages, 'kernel', config=True, tests=True, scripts=True)
|
||||
add_package(packages, 'kernel.core', config=True, tests=True)
|
||||
add_package(packages, 'testing', tests=True)
|
||||
add_package(packages, 'testing.plugin', tests=False)
|
||||
add_package(packages, 'tools', tests=True)
|
||||
add_package(packages, 'UserConfig')
|
||||
return packages
|
||||
@ -220,11 +221,12 @@ def find_scripts():
|
||||
"""
|
||||
scripts = ['IPython/kernel/scripts/ipengine',
|
||||
'IPython/kernel/scripts/ipcontroller',
|
||||
'IPython/kernel/scripts/ipcluster',
|
||||
'IPython/kernel/scripts/ipcluster',
|
||||
'scripts/ipython',
|
||||
'scripts/ipythonx',
|
||||
'scripts/pycolor',
|
||||
'scripts/irunner',
|
||||
'scripts/iptest',
|
||||
]
|
||||
|
||||
# Script to be run by the windows binary installer after the default setup
|
||||
|
Loading…
Reference in New Issue
Block a user