add a very basic test and include _pytest dependency. thanks pedronis.
--HG-- branch : trunk
This commit is contained in:
parent
5d3a3add83
commit
f2b1eb5bba
|
@ -9,6 +9,7 @@ from py.__.test import runner
|
||||||
from py.__.test.config import Config as pytestConfig
|
from py.__.test.config import Config as pytestConfig
|
||||||
import api
|
import api
|
||||||
|
|
||||||
|
pytest_plugins = '_pytest'
|
||||||
|
|
||||||
def pytest_funcarg__linecomp(request):
|
def pytest_funcarg__linecomp(request):
|
||||||
return LineComp()
|
return LineComp()
|
||||||
|
@ -455,11 +456,19 @@ class LineMatcher:
|
||||||
extralines.extend(lines1)
|
extralines.extend(lines1)
|
||||||
return extralines
|
return extralines
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_parseconfig(testdir):
|
def test_parseconfig(testdir):
|
||||||
config1 = testdir.parseconfig()
|
config1 = testdir.parseconfig()
|
||||||
config2 = testdir.parseconfig()
|
config2 = testdir.parseconfig()
|
||||||
assert config2 != config1
|
assert config2 != config1
|
||||||
assert config1 != py.test.config
|
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*"
|
||||||
|
])
|
||||||
|
|
Loading…
Reference in New Issue