can use non-underscored addoption
This commit is contained in:
parent
606ea870f0
commit
5f75c5851f
|
@ -19,7 +19,7 @@ else:
|
||||||
|
|
||||||
def pytest_addoption(parser):
|
def pytest_addoption(parser):
|
||||||
group = parser.getgroup("debugconfig")
|
group = parser.getgroup("debugconfig")
|
||||||
group._addoption('--assertmode', action="store", dest="assertmode",
|
group.addoption('--assertmode', action="store", dest="assertmode",
|
||||||
choices=("on", "old", "off", "default"), default="default",
|
choices=("on", "old", "off", "default"), default="default",
|
||||||
metavar="on|old|off",
|
metavar="on|old|off",
|
||||||
help="""control assertion debugging tools.
|
help="""control assertion debugging tools.
|
||||||
|
@ -27,11 +27,10 @@ def pytest_addoption(parser):
|
||||||
'old' reinterprets the expressions in asserts to glean information.
|
'old' reinterprets the expressions in asserts to glean information.
|
||||||
'on' (the default) rewrites the assert statements in test modules to provide
|
'on' (the default) rewrites the assert statements in test modules to provide
|
||||||
sub-expression results.""")
|
sub-expression results.""")
|
||||||
group._addoption('--no-assert', action="store_true", default=False,
|
group.addoption('--no-assert', action="store_true", default=False,
|
||||||
dest="noassert", help="DEPRECATED equivalent to --assertmode=off")
|
dest="noassert", help="DEPRECATED equivalent to --assertmode=off")
|
||||||
group._addoption('--nomagic', action="store_true", default=False,
|
group.addoption('--nomagic', action="store_true", default=False,
|
||||||
dest="nomagic",
|
dest="nomagic", help="DEPRECATED equivalent to --assertmode=off")
|
||||||
help="DEPRECATED equivalent to --assertmode=off")
|
|
||||||
|
|
||||||
class AssertionState:
|
class AssertionState:
|
||||||
"""State for the assertion plugin."""
|
"""State for the assertion plugin."""
|
||||||
|
|
Loading…
Reference in New Issue