Use default with usepdb option

This is required with `-p no:debugging`.

Ref: https://github.com/pytest-dev/pytest/pull/4967
This commit is contained in:
Daniel Hahler
2019-03-21 05:30:43 +01:00
parent 2bcbdb6745
commit 9f6754f64a
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ def pytest_addoption(parser):
def pytest_cmdline_main(config):
if config.getoption("looponfail"):
usepdb = config.getoption("usepdb") # a core option
usepdb = config.getoption("usepdb", False) # a core option
if usepdb:
raise pytest.UsageError("--pdb is incompatible with --looponfail.")
looponfail_main(config)