Re: [Pyunit-interest] comments on PyUnit
Brought to you by:
purcell
From: Steve P. <ste...@ya...> - 2001-04-23 15:50:51
|
Fred L. Drake, Jr. wrote: > st = parser.suite(open("module.py").read()) > pprint.pprint(st.totuple(1)) > > The last item in each tuple that represents a concrete token gives > the line number for that token (for multi-line tokens, it gives the > line the token *ends* on). It's a pretty pathetic interface, but the > information is there. Thanks Fred, but I don't think even this is enough information, because it doesn't tell whether or not the token will result in that line getting a SET_LINENO instruction. I seem to remember happening across that '1' parameter a while back, and when I compared the results side-by-side with the SET_LINENO map for a given file, it differed quite significantly. I've attached an example script which shows the differences (it's an experimental hack I made ages ago). -Steve -- Steve Purcell, Pythangelist Get testing at http://pyunit.sourceforge.net/ Any opinions expressed herein are my own and not necessarily those of Yahoo |