From fbb0e4b62df47d42d21249f00ae57f1685e12704 Mon Sep 17 00:00:00 2001 From: briandorsey Date: Mon, 30 Mar 2009 00:40:44 +0200 Subject: [PATCH] [svn r63428] added happy path tests for figleaf plugin --HG-- branch : trunk --- py/test/plugin/pytest_figleaf.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/py/test/plugin/pytest_figleaf.py b/py/test/plugin/pytest_figleaf.py index 8f914061c..d192b4c3f 100644 --- a/py/test/plugin/pytest_figleaf.py +++ b/py/test/plugin/pytest_figleaf.py @@ -45,4 +45,21 @@ class FigleafPlugin: self.figleaf.annotate_html.report_as_html(coverage, str(reportdir), exclude, {}) +def test_generic(plugintester): + plugintester.apicheck(FigleafPlugin) +def test_functional(testdir): + testdir.plugins.append('figleaf') + testdir.makepyfile(""" + def f(): + x = 42 + def test_whatever(): + pass + """) + result = testdir.runpytest('-F') + assert result.ret == 0 + assert result.stdout.fnmatch_lines([ + '*figleaf html*' + ]) + print result.stdout.str() + assert 0