##// END OF EJS Templates
Final cleanups responding to Brian's code review....
Final cleanups responding to Brian's code review. The code isn't perfect yet, but good enough for integration into trunk so Evan and the others can start using it. I've noted at the top a few key todo items left to think about.

File last commit:

r964:0a2f2117
r2782:c02ae749
Show More
runtests.py
31 lines | 713 B | text/x-python | PythonLexer
vivainio
-Added a unit testing framework...
r181 """ Run ipython unit tests
This should be launched from inside ipython by "%run runtests.py"
or through ipython command line "ipython runtests.py".
"""
vivainio
move path to external
r964 from IPython.external.path import path
vivainio
-Added a unit testing framework...
r181 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)
vivainio
move path to external
r964 main()