Fetching contributors…
Cannot retrieve contributors at this time
51 lines (41 sloc) 1.58 KB
'''run all examples to make sure we don't get an exception
If an example contaings, then all plot windows have to be closed
manually, at least in my setup.
uncomment to show all plot windows
stop_on_error = True
filelist = ['', '', '',
'', '', #'',
'', '',
'', '',
# time series
if __name__ == "__main__":
#temporarily disable show
import matplotlib.pyplot as plt
plt_show =
def noop(*args):
pass = noop
cont = raw_input("""Are you sure you want to run all of the examples?
This is done mainly to check that they are up to date.
(y/n) >>> """)
if 'y' in cont.lower():
for run_all_f in filelist:
print "\n\nExecuting example file", run_all_f
print "-----------------------" + "-"*len(run_all_f)
#f might be overwritten in the executed file
print "**********************" + "*"*len(run_all_f)
print "ERROR in example file", run_all_f
print "**********************" + "*"*len(run_all_f)
if stop_on_error:
#reenable show after closing windows
plt.close('all') = plt_show