<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"><<a href="mailto:testing-in-python-request@lists.idyll.org" target="_blank">testing-in-python-request@lists.idyll.org</a>></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 'help' 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 "Re: Contents of testing-in-python digest..."<br>
<br>
<br>
Today'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 <<a href="mailto:me@the-compiler.org">me@the-compiler.org</a>><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: <20160713090729.6kpagtnthzt57ct6@tonks><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
* Dale Potter <<a href="mailto:dalepotter@gmail.com">dalepotter@gmail.com</a>> [2016-07-13 09:52:18 +0100]:<br>
> Hello,<br>
><br>
> I am having some interesting errors when trying to set up pytest on a mac<br>
> with a project that uses virtualenv.<br>
><br>
> I?ve run the installation instructions on<br>
> <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>
><br>
><br>
> 1) pip install -U pytest<br>
><br>
> 2) Created a file ?test_sample.py? with contents:<br>
><br>
> def func(x):<br>
> return x + 1<br>
><br>
> def test_answer():<br>
> assert func(3) == 5<br>
><br>
> 3) Running py.test gives the output below.<br>
<br>
It's simply pytest picking up setuptools' 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 "norecursedirs = pyenv" 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: <<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>><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>