Remove unreachable code from config._prepareconfig (#6001)
This commit is contained in:
commit
5e7b8d813b
|
@ -195,7 +195,6 @@ def get_plugin_manager():
|
||||||
|
|
||||||
|
|
||||||
def _prepareconfig(args=None, plugins=None):
|
def _prepareconfig(args=None, plugins=None):
|
||||||
warning = None
|
|
||||||
if args is None:
|
if args is None:
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
elif isinstance(args, py.path.local):
|
elif isinstance(args, py.path.local):
|
||||||
|
@ -213,10 +212,6 @@ def _prepareconfig(args=None, plugins=None):
|
||||||
pluginmanager.consider_pluginarg(plugin)
|
pluginmanager.consider_pluginarg(plugin)
|
||||||
else:
|
else:
|
||||||
pluginmanager.register(plugin)
|
pluginmanager.register(plugin)
|
||||||
if warning:
|
|
||||||
from _pytest.warnings import _issue_warning_captured
|
|
||||||
|
|
||||||
_issue_warning_captured(warning, hook=config.hook, stacklevel=4)
|
|
||||||
return pluginmanager.hook.pytest_cmdline_parse(
|
return pluginmanager.hook.pytest_cmdline_parse(
|
||||||
pluginmanager=pluginmanager, args=args
|
pluginmanager=pluginmanager, args=args
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue