Merge remote-tracking branch 'upstream/master' into mm
Conflicts: src/_pytest/main.py src/_pytest/mark/structures.py src/_pytest/python.py testing/test_main.py testing/test_parseopt.py
This commit is contained in:
@@ -28,7 +28,6 @@ from pluggy import HookspecMarker
|
||||
from pluggy import PluginManager
|
||||
|
||||
import _pytest._code
|
||||
import _pytest.assertion
|
||||
import _pytest.deprecated
|
||||
import _pytest.hookspec # the extension point definitions
|
||||
from .exceptions import PrintHelp
|
||||
@@ -284,6 +283,8 @@ class PytestPluginManager(PluginManager):
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
import _pytest.assertion
|
||||
|
||||
super().__init__("pytest")
|
||||
# The objects are module objects, only used generically.
|
||||
self._conftest_plugins = set() # type: Set[object]
|
||||
@@ -917,6 +918,8 @@ class Config:
|
||||
ns, unknown_args = self._parser.parse_known_and_unknown_args(args)
|
||||
mode = getattr(ns, "assertmode", "plain")
|
||||
if mode == "rewrite":
|
||||
import _pytest.assertion
|
||||
|
||||
try:
|
||||
hook = _pytest.assertion.install_importhook(self)
|
||||
except SystemError:
|
||||
|
||||
Reference in New Issue
Block a user