From bddb922f7bd39c378fb97d42ed04d49108c27362 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 4 Mar 2017 16:32:10 -0300 Subject: [PATCH] Rename internal option to disable_warnings --- _pytest/terminal.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_pytest/terminal.py b/_pytest/terminal.py index f8d3ec2ce..d0bb4f4b5 100644 --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -27,7 +27,7 @@ def pytest_addoption(parser): "Warnings are displayed at all times except when " "--disable-warnings is set") group._addoption('--disable-warnings', '--disable-pytest-warnings', default=False, - dest='disablepytestwarnings', action='store_true', + dest='disable_warnings', action='store_true', help='disable warnings summary, overrides -r w flag') group._addoption('-l', '--showlocals', action="store_true", dest="showlocals", default=False, @@ -57,9 +57,9 @@ def pytest_configure(config): def getreportopt(config): reportopts = "" reportchars = config.option.reportchars - if not config.option.disablepytestwarnings and 'w' not in reportchars: + if not config.option.disable_warnings and 'w' not in reportchars: reportchars += 'w' - elif config.option.disablepytestwarnings and 'w' in reportchars: + elif config.option.disable_warnings and 'w' in reportchars: reportchars = reportchars.replace('w', '') if reportchars: for char in reportchars: