Further reverting changes.

This commit is contained in:
Victor Maryama 2019-06-26 17:32:35 +02:00
parent f755ff6af1
commit d91a5d3cd7
1 changed files with 2 additions and 4 deletions

View File

@ -746,10 +746,8 @@ class Config:
and find all the installed plugins to mark them for rewriting
by the importhook.
"""
# Saving _ns so it can be used for other assertion rewriting purposes
# e.g. experimental assertion pass hook
_ns, _unknown_args = self._parser.parse_known_and_unknown_args(args)
mode = getattr(_ns, "assertmode", "plain")
ns, unknown_args = self._parser.parse_known_and_unknown_args(args)
mode = getattr(ns, "assertmode", "plain")
if mode == "rewrite":
try:
hook = _pytest.assertion.install_importhook(self)