homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author trent
Recipients barry, loewis, mark.dickinson, trent
Date 2008年03月17日.06:41:07
SpamBayes Score 0.010189313
Marked as misclassified No
Message-id <1205736072.08.0.278224949232.issue719888@psf.upfronthosting.co.za>
In-reply-to
Content
I've attached a patch to test_tokenizer.py and a bunch of text files 
(that should be dropped into Lib/test) that highlight this issue a 
*lot* better than the current state of affairs.
The existing implementation defines roundup() in the doctest, then 
proceeds to define it again in the code body. The last for loop in the 
doctest is failing every so often -- what it's failing on isn't at all 
clear as a) ten random files are selected out of 332 in Lib/test, and 
b) there's no way of figuring out which files are causing it to fail 
unless you hack another method into the test case to try and replicate 
what the doctest is doing, with some additional print statements (which 
is the approach I took, only to get bitten by the fact that roundup() 
was being resolved to the bogus definition that's in the code body, not 
the functional one in the doctest, which resulted in even more 
misleading behaviour).
FWIW, the file that causes the exception is test_doctest2.py as it 
contains encoded characters.
So, the approach this patch takes is to drop the 'pick ten random test 
files and untokenize/tokenize' approach and add a class that 
specifically tests for the tokenizer's compliance with PEP 0263.
I'll move on to a patch to tokenizer.py now, but this patch is ok to 
commit now -- it'll clean up the misleading errors being reported by 
the plethora of red 3.0 buildbots at the moment at the very least.
History
Date User Action Args
2008年03月17日 06:41:12trentsetspambayes_score: 0.0101893 -> 0.010189313
recipients: + trent, loewis, barry, mark.dickinson
2008年03月17日 06:41:12trentsetspambayes_score: 0.0101893 -> 0.0101893
messageid: <1205736072.08.0.278224949232.issue719888@psf.upfronthosting.co.za>
2008年03月17日 06:41:10trentlinkissue719888 messages
2008年03月17日 06:41:08trentcreate

AltStyle によって変換されたページ (->オリジナル) /