Hi,
just played around with traceback cut/filter
but i don't understand whats happening here:

        >>> import py
        >>> py._pydir
        local('/home/ronny/Projects/py/py')
        >>> e = py.test.raises(ValueError, "int('a')")
        >>> tb = e.traceback
        >>> tb.cut(excludepath=py._pydir)
        [<TracebackEntry /home/ronny/Projects/py/py/_test/outcome.py:89>, 
<TracebackEntry /home/ronny/Projects/py/py/_builtin.py:179>, <TracebackEntry 
<string>:5>, <TracebackEntry <codegen 
/home/ronny/Projects/py/py/_test/outcome.py:88>:1>]


i expected it to remove the first few items

on the other hand
        >>> tb.filter(lambda x:not
        py.path.local(x.path).relto(py._pydir))
        [<TracebackEntry <string>:5>, <TracebackEntry
        <codegen /home/ronny/Projects/py/py/_test/outcome.py:88>:1>]
        
seems to do exactly that and i expected it to filter the last entry, too

can we please clarify what each of those really.

ps:
        ~/Projects/py $ hg id
        201d526c373c (trunk) tip

Regards Ronny


_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

Reply via email to