| # (Force the script to use the latest build.) |
| def testChunk(t, fileName): |
| tup = parser.st2tuple(st) |
| # this discards the first ST; a huge memory savings when running |
| # against a large source file like Tkinter.py. |
| new = parser.tuple2st(tup) |
| except parser.ParserError, err: |
| print 'parser module raised exception on input file', fileName + ':' |
| _numFailed = _numFailed + 1 |
| if tup != parser.st2tuple(new): |
| print 'parser module failed on input file', fileName |
| _numFailed = _numFailed + 1 |
| t = open(fileName).read() |
| sys.exit(_numFailed != 0) |
| if __name__ == '__main__': |