added another funcarg example i had lying around
--HG-- branch : trunk
This commit is contained in:
15
example/funcarg/urloption/conftest.py
Normal file
15
example/funcarg/urloption/conftest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# conftest.py
|
||||
import py
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
grp = parser.addgroup("testserver options")
|
||||
grp.addoption("--url", action="store", default=None,
|
||||
help="url for testserver")
|
||||
|
||||
def pytest_funcarg__url(request):
|
||||
url = request.config.getvalue("url")
|
||||
if url is None:
|
||||
py.test.skip("need --url")
|
||||
return url
|
||||
|
||||
Reference in New Issue
Block a user