A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-March/063204.html below:

[Python-Dev] Nasty trunk test failures

[Python-Dev] Nasty trunk test failures [Python-Dev] Nasty trunk test failuresGuido van Rossum guido at python.org
Thu Mar 30 23:43:33 CEST 2006
On 3/30/06, Tim Peters <tim.peters at gmail.com> wrote:
> test_tokenize started failing on all the trunk buildbots immediately
> after this seemingly unrelated checkin:

tokenize seems to be mishandling this line:

        assert 6 .__index__() == 6

Note the space between '6' and '.'.

I'm guessing that the untokenization of this somehow drops the space;
this seems to be a bug in untokenize() which probably should add a
safety space after names as well as numbers. Yes, this fixes the
problem:

Index: tokenize.py
===================================================================
--- tokenize.py (revision 43463)
+++ tokenize.py (working copy)
@@ -182,7 +182,7 @@
     for tok in iterable:
         toknum, tokval = tok[:2]

-        if toknum == NAME:
+        if toknum in (NAME, NUMBER):
             tokval += ' '

         if toknum == INDENT:

I'll check this in.

Then there's another (shallow) problem that only occurs when I run
test_tokenize.py directly -- the doctest for decistmt()
has-3.21716034272e-007 but (on my box) this outputs
-3.21716034272e-07. That doesn't seem to bother it when run via
regrtest.py. I'm not sure what's at fault here.

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4