mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-18 11:55:46 +08:00
Add module I forgot
This commit is contained in:
parent
15ae52f8e6
commit
cc13fca3c2
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)
|
Loading…
Reference in New Issue
Block a user