def example(tmpdir):
p = tmpdir.join("example.txt")
p.write(py.std.textwrap.dedent("""\
a simple test function call with one argument factory
==============================================================
the function argument. Let's look at a simple self-contained
example that you can put into a test module::
# content of: test_simplefactory.py
def pytest_funcarg__myfuncarg(request):
return 42
def test_function(myfuncarg):
assert myfuncarg == 17
.. code-block:: bash
$ py.test test_simplefactory.py
output should be here - but thats nice for testing
the end.
"""))
return p
评论列表
文章目录