[Imps] Patch to convert test_parser to unittest

James Graham jg307 at cam.ac.uk
Thu Dec 14 08:27:06 PST 2006

Sam Ruby wrote:
> Two attachments: one to convert the existing test_parser.py to use 
> unittset (this patch also includes some minor cleanup to 
> test_tokenizer); and the other is a master script to run all tests 
> (place this script in the tests directory).

Sam, just reading the patch it seems that, when a test fails, this will just 
print the test number and the input that failed. However, for the purposes of 
debugging it has been very useful to have both the expected and actual parse 
tree printed when running the tests (similarly with the token lists in the 
tokenizer tests). It this easy to change? I tried with the tokenizer test cases 
but couldn't quite see where the right place to inject the actual output into 
the error message would be. Am I missing something obvious? If this issue can't 
be resolved, I'm quite reluctant to apply the patch because it seems to regress 
useful functionality.

"Eternity's a terrible thought. I mean, where's it all going to end?"
  -- Tom Stoppard, Rosencrantz and Guildenstern are Dead

More information about the Implementors mailing list