[pytest-dev] code coverage of tests using pytester - testdir.runpytest

holger krekel holger at merlinux.eu
Sun Apr 19 09:32:24 CEST 2015


On Sat, Apr 18, 2015 at 22:53 +0200, Anatoly Bubenkov wrote:
> Its not always enough and possible to use inline run, but indeed helps for
> pytest-cov

I'd like to make inline_run behave as much as possible like runpytest()
(which creates a subprocess).  One issue is capturing output, what are
others in your experience?

holger


> On Apr 17, 2015 11:34 PM, "Eduardo Schettino" <schettino72 at gmail.com> wrote:
> 
> > Thanks, I solved my problem using testdir.inline_run().
> >
> > The lack of output doesnt matter because I can use TestReport objects...
> >
> > cheers
> >
> > On Sat, Apr 18, 2015 at 3:38 AM, Anatoly Bubenkov <bubenkoff at gmail.com>
> > wrote:
> >
> >> Yes i had the same issue and solved it by avoiding pytest-cov.
> >> See pytest-splinter and its tox.ini coveralls testenv.
> >> On Apr 17, 2015 8:39 PM, "Eduardo Schettino" <schettino72 at gmail.com>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> I am using the pytester plugin to test my own plugin.
> >>>
> >>> It works ok but I can not get code coverage because testdir.runpytest
> >>> uses os.popen().
> >>> Have anyone managed to work around that? Can you point me to a
> >>> project/plugin that handles that?
> >>>
> >>> cheers,
> >>>   Eduardo
> >>>
> >>> _______________________________________________
> >>> pytest-dev mailing list
> >>> pytest-dev at python.org
> >>> https://mail.python.org/mailman/listinfo/pytest-dev
> >>>
> >>>
> >
> > _______________________________________________
> > pytest-dev mailing list
> > pytest-dev at python.org
> > https://mail.python.org/mailman/listinfo/pytest-dev
> >
> >

> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev


-- 
about me:    http://holgerkrekel.net/about-me/
contracting: http://merlinux.eu


More information about the pytest-dev mailing list