[issue12581] Increased test coverage of test_urlparse

Senthil Kumaran report at bugs.python.org
Sat Jul 23 12:19:54 CEST 2011


Senthil Kumaran <senthil at uthcode.com> added the comment:

On Sat, Jul 23, 2011 at 09:37:27AM +0000, Éric Araujo wrote:
> I’ve had a look at the docstring and the reST docs, and they clearly
> say that sequences are supported, not arbitrary iterables.

Yeah. At the first cut, when I saw the suggestion of iter(), I thought
it was better, but looking at it again, we just need to test the
sequence-ness. I would leave it as such with len() unless we come up
with a case that it does not test the sequenceness completely.

As Eric points out, changing it to iter may cause some side-effects
(of exhaustion of the container)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12581>
_______________________________________


More information about the Python-bugs-list mailing list