Fix some issues related to "-p no:X" with default_plugins

This commit is contained in:
Daniel Hahler
2019-03-21 04:50:51 +01:00
parent 15ef168821
commit 553951c443
5 changed files with 45 additions and 6 deletions

View File

@@ -762,7 +762,7 @@ class Config(object):
by the importhook.
"""
ns, unknown_args = self._parser.parse_known_and_unknown_args(args)
mode = ns.assertmode
mode = getattr(ns, "assertmode", "plain")
if mode == "rewrite":
try:
hook = _pytest.assertion.install_importhook(self)