From f2b1eb5bba8cb59423d5963e8cf5149d2a4f8edc Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 21 May 2009 15:22:01 +0200 Subject: [PATCH] add a very basic test and include _pytest dependency. thanks pedronis. --HG-- branch : trunk --- py/test/plugin/pytest_pytester.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/py/test/plugin/pytest_pytester.py b/py/test/plugin/pytest_pytester.py index da685dd86..468bb2175 100644 --- a/py/test/plugin/pytest_pytester.py +++ b/py/test/plugin/pytest_pytester.py @@ -9,6 +9,7 @@ from py.__.test import runner from py.__.test.config import Config as pytestConfig import api +pytest_plugins = '_pytest' def pytest_funcarg__linecomp(request): return LineComp() @@ -455,11 +456,19 @@ class LineMatcher: extralines.extend(lines1) return extralines - - - def test_parseconfig(testdir): config1 = testdir.parseconfig() config2 = testdir.parseconfig() assert config2 != config1 assert config1 != py.test.config + +def test_testdir_runs_with_plugin(testdir): + testdir.makepyfile(""" + pytest_plugins = "pytest_pytester" + def test_hello(testdir): + assert 1 + """) + result = testdir.runpytest() + assert result.stdout.fnmatch_lines([ + "*1 passed*" + ])