On Tue, Mar 25, 2014 at 1:12 AM, Fidel N <[email protected]> wrote:
> Edward, given you have your test code inside a node body, how would you run
> it with SherlockTracing and show the outcome in leo log pane?
> Is that possible?
The following is tested code::
patterns = ['+test*',]
sherlock = g.SherlockTracer(patterns)
# other keyword arguments exist.
def test():
test2('25')
def test2(n):
print(n)
try:
g.redirectStdout()
print('\n')
sherlock.run()
test()
sherlock.stop()
finally:
g.restoreStdout()
For a more interesting example, see the run function in pylint-leo.py.
As I was writing this reply, I found a bug in the pattern matching
logic. I'll fix this today. Also, I'll be tweaking the
SherlockTracer code today as I work on tracing through pylint.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.