Dynamic inspection via code snippet - first implementation

10 views
Skip to first unread message

Michał Kwiatkowski

unread,
Mar 1, 2010, 2:15:41 PM3/1/10
to pytho...@googlegroups.com
Hi all,

Today I stared work on the "Dynamic inspection via code snippet" blueprint.

https://blueprints.launchpad.net/pythoscope/+spec/dynamic-inspection-via-code-snippet

This will serve as a (hopefully better) alternative to entry points.

If anyone wants to try it, trunk contains the first implementation. It
worked on some simple examples I checked, but more testing is in
order. I'm gonna try a real app tomorrow.

You use it exactly like you would use coverage.py or figleaf. Put this
at the top of your Python script:

import pythoscope
pythoscope.start()

and the following before it exits:

pythoscope.stop()

Note that you have to do pythoscope --init *first*, only after that
you can run your script. Once you exit your app, calling pythoscope
will generate test cases based on data gathered during the run.

Cheers,
mk

Reply all
Reply to author
Forward
0 new messages