Files
pytest2/testing/plugin/test_pytest_tmpdir.py
holger krekel 2cf22e3124 shift all python related testing functioanlity to a dedicated
pytest_python

plugin which incorporates pytest's logic of python function testing (including funcargs).

--HG--
branch : trunk
2010-09-25 18:23:26 +02:00

10 lines
348 B
Python

from py._plugin.pytest_tmpdir import pytest_funcarg__tmpdir
from py._plugin.pytest_python import FuncargRequest
def test_funcarg(testdir):
item = testdir.getitem("def test_func(tmpdir): pass")
p = pytest_funcarg__tmpdir(FuncargRequest(item))
assert p.check()
bn = p.basename.strip("0123456789")
assert bn.endswith("test_func")