views:

21

answers:

1

Is it possible to use IPython's log functionality to automate testing?

For example, if I log an IPython session to a file is there a way to automatically replay this session and compare the output to the output of the original session? I would like to make several refactoring passes of my python code and replay this log file back to be sure I didn't break anything.

Something similar is offered with Cmd2 (read at the bottom of the page), but I would prefer to use the extended functionality offered with IPython.

A: 

I think the answers to an adjacent thread will get you there (save it as an .ipy file, let iPython do its magic)

clew