<br><br><div class="gmail_quote">On Tue, Aug 17, 2010 at 9:55 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 17/08/2010 16:53, Alfredo Deza wrote:
<blockquote type="cite"><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" target="_blank">fuzzyman@voidspace.org.uk</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
    <div bgcolor="#ffffff" text="#000000">
    <div>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>
</blockquote>
<br></div>
unittest2 works fine with Python 2.7 (and will soon have features that
are in unittest in python 3.2 but not in 2.7).<br>
<br></div></blockquote><div>ahh got it... so regardless of doing &quot; install_requires = [&#39;unittes2&#39;] &quot; in Python2.7 and later, it will still work... I thought unittest2 was</div><div>*only* for extending compatibility to older versions of Python.</div>
<div><br></div><div>Thanks for the response!</div><div><br></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 Foord<div class="im"><br>
<blockquote type="cite">
  <div class="gmail_quote">
  <div> </div>
  <div> </div>
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
    <div bgcolor="#ffffff" text="#000000">Michael
    <div><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>
</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>