<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 16/08/2010 02:21, Ned Batchelder wrote:
<blockquote cite="mid:4C689280.40002@nedbatchelder.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
I had to bridge this gap for coverage.py, and ended up doing it for a
few methods, see
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://bitbucket.org/ned/coveragepy/src/tip/test/backunittest.py">http://bitbucket.org/ned/coveragepy/src/tip/test/backunittest.py</a><br>
<br>
But this method bothers me: the Multiline aspect has nothing to do with
the comparison, only with the reporting of failed assertions. Better
would be to have assertEqual be smart enough to recognize that the
arguments are multiline strings, and just do the right thing with them.<br>
<br>
</blockquote>
<br>
If you use unittest2 then you get assertMultilineEqual and smarter
assertEqual behaviour.<br>
<br>
Michael<br>
<br>
<blockquote cite="mid:4C689280.40002@nedbatchelder.com" type="cite">--Ned.<br>
<br>
On 8/15/2010 8:42 PM, Alfredo Deza wrote:
<blockquote
cite="mid:AANLkTi=NtE7eh_y8udPCKAmANZDmrKaaJUr5G+u2nkRt@mail.gmail.com"
type="cite">Hi,
<div><br>
</div>
<div>Is there anything like <a moz-do-not-send="true"
href="http://docs.python.org/library/unittest.html#unittest.TestCase.assertMultiLineEqual">assertMultilineEqual</a>
for older versions of Python (e.g. not 2.7)?</div>
<div><br>
</div>
<div>I think nose and pytest may have already solved that, but is
there an easy way that doesn't require added dependencies?</div>
<div><br>
</div>
<div>Thanks!</div>
<pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
testing-in-python mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.ironpythoninaction.com/">http://www.ironpythoninaction.com/</a></pre>
</body>
</html>