<div dir="ltr"><div>Many thanks Florian - your suggestion to rename the virtual environment did the trick!</div><div><br></div><div>Out of interest, do you know where I can find the pytest.ini file that you mentioned? I have looked all through my .pyenv but I cannot find it.</div><div><br></div><div>Best,</div><div>Dale</div><div><br></div><br><div class="gmail_extra"><br><div class="gmail_quote">On 13 July 2016 at 20:00,  <span dir="ltr">&lt;<a href="mailto:testing-in-python-request@lists.idyll.org" target="_blank">testing-in-python-request@lists.idyll.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Send testing-in-python mailing list submissions to<br>
        <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:testing-in-python-request@lists.idyll.org">testing-in-python-request@lists.idyll.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:testing-in-python-owner@lists.idyll.org">testing-in-python-owner@lists.idyll.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of testing-in-python digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: pytest installation - setuptools causing failures<br>
      (Florian Bruhin)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 13 Jul 2016 11:07:29 +0200<br>
From: Florian Bruhin &lt;<a href="mailto:me@the-compiler.org">me@the-compiler.org</a>&gt;<br>
Subject: Re: [TIP] pytest installation - setuptools causing failures<br>
To: <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
Message-ID: &lt;20160713090729.6kpagtnthzt57ct6@tonks&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
* Dale Potter &lt;<a href="mailto:dalepotter@gmail.com">dalepotter@gmail.com</a>&gt; [2016-07-13 09:52:18 +0100]:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I am having some interesting errors when trying to set up pytest on a mac<br>
&gt; with a project that uses virtualenv.<br>
&gt;<br>
&gt; I?ve run the installation instructions on<br>
&gt; <a href="http://docs.pytest.org/en/latest/getting-started.html" rel="noreferrer" target="_blank">http://docs.pytest.org/en/latest/getting-started.html</a> :<br>
&gt;<br>
&gt;<br>
&gt; 1) pip install -U pytest<br>
&gt;<br>
&gt; 2) Created a file ?test_sample.py? with contents:<br>
&gt;<br>
&gt; def func(x):<br>
&gt;     return x + 1<br>
&gt;<br>
&gt; def test_answer():<br>
&gt;     assert func(3) == 5<br>
&gt;<br>
&gt; 3) Running py.test gives the output below.<br>
<br>
It&#39;s simply pytest picking up setuptools&#39; tests inside your<br>
virtualenv, which is probably not what you intended.<br>
<br>
Either name it something like .pyenv (as pytest excludes hidden<br>
directories by default), or add &quot;norecursedirs = pyenv&quot; to your<br>
pytest.ini:<br>
<a href="http://pytest.org/latest/customize.html#confval-norecursedirs" rel="noreferrer" target="_blank">http://pytest.org/latest/customize.html#confval-norecursedirs</a><br>
<br>
Florian<br>
<br>
--<br>
<a href="http://www.the-compiler.org" rel="noreferrer" target="_blank">http://www.the-compiler.org</a> | <a href="mailto:me@the-compiler.org">me@the-compiler.org</a> (Mail/XMPP)<br>
   GPG: 916E B0C8 FD55 A072 | <a href="http://the-compiler.org/pubkey.asc" rel="noreferrer" target="_blank">http://the-compiler.org/pubkey.asc</a><br>
         I love long mails! | <a href="http://email.is-not-s.ms/" rel="noreferrer" target="_blank">http://email.is-not-s.ms/</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 819 bytes<br>
Desc: not available<br>
URL: &lt;<a href="http://lists.idyll.org/pipermail/testing-in-python/attachments/20160713/9cd06354/attachment-0001.pgp" rel="noreferrer" target="_blank">http://lists.idyll.org/pipermail/testing-in-python/attachments/20160713/9cd06354/attachment-0001.pgp</a>&gt;<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
<br>
<br>
End of testing-in-python Digest, Vol 114, Issue 4<br>
*************************************************<br>
</blockquote></div><br></div></div>