remove deprecated parser.addgroup usage in favour of getgroup

--HG--
branch : trunk
This commit is contained in:
holger krekel 2009-10-27 10:03:11 +01:00
parent fb159b0d40
commit a161a865c8
7 changed files with 8 additions and 8 deletions

View File

@ -8,7 +8,7 @@ py.test.importorskip("figleaf.annotate_html")
import figleaf
def pytest_addoption(parser):
group = parser.addgroup('figleaf options')
group = parser.getgroup('figleaf options')
group.addoption('-F', action='store_true', default=False,
dest = 'figleaf',
help=('trace python coverage with figleaf and write HTML '

View File

@ -7,7 +7,7 @@ import py
pylint = py.test.importorskip("pylint.lint")
def pytest_addoption(parser):
group = parser.addgroup('pylint options')
group = parser.getgroup('pylint options')
group.addoption('--pylint', action='store_true',
default=False, dest='pylint',
help='run pylint on python files.')

View File

@ -5,7 +5,7 @@ import py
import sys
def pytest_addoption(parser):
group = parser.addgroup("ReST", "ReST documentation check options")
group = parser.getgroup("ReST", "ReST documentation check options")
group.addoption('-R', '--urlcheck',
action="store_true", dest="urlcheck", default=False,
help="urlopen() remote links found in ReST text files.")

View File

@ -6,7 +6,7 @@ import py
from py.builtin import print_
def pytest_addoption(parser):
group = parser.addgroup("resultlog", "resultlog plugin options")
group = parser.getgroup("resultlog", "resultlog plugin options")
group.addoption('--resultlog', action="store", dest="resultlog", metavar="path", default=None,
help="path for machine-readable result log.")

View File

@ -3,7 +3,7 @@ import py
def pytest_addoption(parser):
grp = parser.addgroup("testserver options")
grp = parser.getgroup("testserver options")
grp.addoption("--url", action="store", default=None,
help="url for testserver")

View File

@ -23,7 +23,7 @@ class TestConfigCmdlineParsing:
def test_parser_addoption_default_env(self, testdir, monkeypatch):
import os
config = testdir.Config()
group = config._parser.addgroup("hello")
group = config._parser.getgroup("hello")
monkeypatch.setitem(os.environ, 'PYTEST_OPTION_OPTION1', 'True')
group.addoption("--option1", action="store_true")

View File

@ -89,7 +89,7 @@ class TestConfigPickling:
def test_config_pickling_customoption(self, testdir):
testdir.makeconftest("""
def pytest_addoption(parser):
group = parser.addgroup("testing group")
group = parser.getgroup("testing group")
group.addoption('-G', '--glong', action="store", default=42,
type="int", dest="gdest", help="g value.")
""")
@ -109,7 +109,7 @@ class TestConfigPickling:
tmp.ensure("__init__.py")
tmp.join("conftest.py").write(py.code.Source("""
def pytest_addoption(parser):
group = parser.addgroup("testing group")
group = parser.getgroup("testing group")
group.addoption('-G', '--glong', action="store", default=42,
type="int", dest="gdest", help="g value.")
"""))