[Python-Dev] Failin tests on Windows

Guido van Rossum guido@python.org
Fri, 25 Apr 2003 19:51:30 -0400


> [Guido van Rossum]
> 
> > > test_urllib.py is crashing on my fresh WinMe build:
> > >
> > > test_fileno (__main__.urlopen_FileTests) ... FAIL
> > > test_iter (__main__.urlopen_FileTests) ... FAIL
> > > test_read (__main__.urlopen_FileTests) ... FAIL
> > > test_readline (__main__.urlopen_FileTests) ... FAIL
> > > test_readlines (__main__.urlopen_FileTests) ... FAIL
> >
> > Should be fixed now -- I'm writing the file with test data in binary
> > mode.
> >
> 
> Didn't even think of that problem when I wrote the tests.  Should I
> patch the docs for urllib (again =) to say that files are open in
> binary?  I know I wasn't expecting urllib to open in binary mode for
> a local text file.

It's a good idea to document that urllib (currently!) never does
newline translation.  Given that URLs often point to binary files,
that's probably a good idea!

> Thanks for fixing this, Guido.  I think I am going to do a self-imposed
> "no checkins within 24 hours of a planned release" rule.

Yeah, me too. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)