<br><br><div class="gmail_quote">On Tue, Aug 17, 2010 at 5:43 AM, Michael Foord <span dir="ltr">&lt;<a href="mailto:fuzzyman@voidspace.org.uk">fuzzyman@voidspace.org.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



  

<div bgcolor="#ffffff" text="#000000"><div class="im">
On 16/08/2010 02:21, Ned Batchelder wrote:
<blockquote type="cite">
  
I had to bridge this gap for coverage.py, and ended up doing it for a
few methods, see
  <a href="http://bitbucket.org/ned/coveragepy/src/tip/test/backunittest.py" target="_blank">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></div>
If you use unittest2 then you get assertMultilineEqual and smarter
assertEqual behaviour.<br>
<br></div></blockquote><div>If unittest2 is meant for Python versions older than 2.7, how do you go around specifying that in a package? I usually have a:</div><div><br></div><div>tests_require = [&#39;nose&#39;, &#39;webtest&#39;]</div>
<div><br></div><div>Or similar packages (e.g. pytest)</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">

Michael<div class="im"><br>
<br>
<blockquote type="cite">--Ned.<br>
  <br>
On 8/15/2010 8:42 PM, Alfredo Deza wrote:
  <blockquote type="cite">Hi,
    <div><br>
    </div>
    <div>Is there anything like <a href="http://docs.python.org/library/unittest.html#unittest.TestCase.assertMultiLineEqual" target="_blank">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&#39;t require added dependencies?</div>
    <div><br>
    </div>
    <div>Thanks!</div>
    <pre><fieldset></fieldset>
_______________________________________________
testing-in-python mailing list
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a>
  </pre>
  </blockquote>
  <pre><fieldset></fieldset>
_______________________________________________
testing-in-python mailing list
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a>
  </pre>
</blockquote>
<br>
<br>
</div><font color="#888888"><pre cols="72">-- 
<a href="http://www.ironpythoninaction.com/" target="_blank">http://www.ironpythoninaction.com/</a></pre>
</font></div>

</blockquote></div><br>