🔧 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:
Tony Narlock 2022-10-14 16:10:21 -05:00
parent 15ac0349b2
commit 2b6622fdd3
1 changed files with 6 additions and 0 deletions

View File

@ -178,6 +178,12 @@ def pytest_addoption(parser: Parser) -> None:
default=False,
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(
"--tb",
metavar="style",