[Python-Dev] [Python-checkins] cpython: Revert the Lib/test/test_bigmem.py changes from commit 17891566a478 (and a

Antoine Pitrou solipsis at pitrou.net
Fri Mar 25 18:09:28 CET 2011


On Fri, 25 Mar 2011 17:44:26 +0100
Éric Araujo <merwok at netwok.org> wrote:
> Hi,
> 
> > changeset:   68921:11dc3f270594
> > user:        Thomas Wouters <thomas at python.org>
> > date:        Fri Mar 25 11:42:37 2011 +0100
> > summary:
> >   Revert the Lib/test/test_bigmem.py changes from commit 17891566a478 (and a
> > few other assertEqual tests that snuck in), and expand the docstrings and
> > comments explaining why and how these tests are supposed to work.
> 
> Your commit message does not explain why you reverted the changes.  The
> specific assert* methods give more useful messages than assertEqual in
> case of failure.

Because they don't go well with huge inputs?

>>> s = "x" * (2**29)
>>> case.assertEqual(s + "a", s + "b")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 643,
in assertEqual assertion_func(first, second, msg=msg)
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 984,
in assertMultiLineEqual secondlines = [second + '\n']
MemoryError


(of course, the functions could just be fixed)




More information about the Python-Dev mailing list