[TIP] pytest installation - setuptools causing failures

Dale Potter dalepotter at gmail.com
Fri Jul 15 09:00:19 PDT 2016


Many thanks Florian - your suggestion to rename the virtual environment did
the trick!

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.

Best,
Dale



On 13 July 2016 at 20:00, <testing-in-python-request at lists.idyll.org> wrote:

> Send testing-in-python mailing list submissions to
>         testing-in-python at lists.idyll.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.idyll.org/listinfo/testing-in-python
> or, via email, send a message with subject or body 'help' to
>         testing-in-python-request at lists.idyll.org
>
> You can reach the person managing the list at
>         testing-in-python-owner at lists.idyll.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of testing-in-python digest..."
>
>
> Today's Topics:
>
>    1. Re: pytest installation - setuptools causing failures
>       (Florian Bruhin)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 13 Jul 2016 11:07:29 +0200
> From: Florian Bruhin <me at the-compiler.org>
> Subject: Re: [TIP] pytest installation - setuptools causing failures
> To: testing-in-python at lists.idyll.org
> Message-ID: <20160713090729.6kpagtnthzt57ct6 at tonks>
> Content-Type: text/plain; charset="utf-8"
>
> * Dale Potter <dalepotter at gmail.com> [2016-07-13 09:52:18 +0100]:
> > Hello,
> >
> > I am having some interesting errors when trying to set up pytest on a mac
> > with a project that uses virtualenv.
> >
> > I?ve run the installation instructions on
> > http://docs.pytest.org/en/latest/getting-started.html :
> >
> >
> > 1) pip install -U pytest
> >
> > 2) Created a file ?test_sample.py? with contents:
> >
> > def func(x):
> >     return x + 1
> >
> > def test_answer():
> >     assert func(3) == 5
> >
> > 3) Running py.test gives the output below.
>
> It's simply pytest picking up setuptools' tests inside your
> virtualenv, which is probably not what you intended.
>
> Either name it something like .pyenv (as pytest excludes hidden
> directories by default), or add "norecursedirs = pyenv" to your
> pytest.ini:
> http://pytest.org/latest/customize.html#confval-norecursedirs
>
> Florian
>
> --
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
>    GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
>          I love long mails! | http://email.is-not-s.ms/
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 819 bytes
> Desc: not available
> URL: <
> http://lists.idyll.org/pipermail/testing-in-python/attachments/20160713/9cd06354/attachment-0001.pgp
> >
>
> ------------------------------
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>
> End of testing-in-python Digest, Vol 114, Issue 4
> *************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20160715/7f08b9b7/attachment.html>


More information about the testing-in-python mailing list