🔧 Negating --showlocals with --no-showlocals
This is necessary for addopts=--showlocals where individual test runs need to not show locals.
This commit is contained in:
parent
15ac0349b2
commit
2b6622fdd3
|
@ -178,6 +178,12 @@ def pytest_addoption(parser: Parser) -> None:
|
||||||
default=False,
|
default=False,
|
||||||
help="Show locals in tracebacks (disabled by default)",
|
help="Show locals in tracebacks (disabled by default)",
|
||||||
)
|
)
|
||||||
|
group._addoption(
|
||||||
|
"--no-showlocals",
|
||||||
|
action="store_false",
|
||||||
|
dest="showlocals",
|
||||||
|
help="Hide locals in tracebacks (negate --showlocals passed through addopts)",
|
||||||
|
)
|
||||||
group._addoption(
|
group._addoption(
|
||||||
"--tb",
|
"--tb",
|
||||||
metavar="style",
|
metavar="style",
|
||||||
|
|
Loading…
Reference in New Issue