##// END OF EJS Templates
Massive amount of work to improve the test suite, restores doctests....
Massive amount of work to improve the test suite, restores doctests. After Brian's comments, I realized that our test machinery was NOT in reality running all the ipython-syntax doctests we have. This is now fixed. The test suite isn't completely passing, but this commit is for the underlying machinery. I will now work on fixing as many broken tests as I can. Fixes https://bugs.launchpad.net/ipython/+bug/505071

File last commit:

r964:0a2f2117
r2414:7fce7ae8
Show More
runtests.py
31 lines | 713 B | text/x-python | PythonLexer
""" Run ipython unit tests
This should be launched from inside ipython by "%run runtests.py"
or through ipython command line "ipython runtests.py".
"""
from IPython.external.path import path
import pprint,os
import IPython.ipapi
ip = IPython.ipapi.get()
def main():
all = path('.').files('test_*py')
results = {}
res_exc = [None]
def exchook(self,*e):
res_exc[0] = [e]
ip.IP.set_custom_exc((Exception,), exchook)
startdir = os.getcwd()
for test in all:
print test
res_exc[0] = 'ok'
os.chdir(startdir)
ip.runlines(test.text())
results[str(test)] = res_exc[0]
os.chdir(startdir)
pprint.pprint(results)
main()