Skip to content

Commit afac1f0

Browse files
author
Philipp Loose
committed
Remove unreachable code from config._prepareconfig
The code that could trigger the execution of the removed lines was removed with a7e4016.
1 parent 0783030 commit afac1f0

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/_pytest/config/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ def get_plugin_manager():
195195

196196

197197
def _prepareconfig(args=None, plugins=None):
198-
warning = None
199198
if args is None:
200199
args = sys.argv[1:]
201200
elif isinstance(args, py.path.local):
@@ -213,10 +212,6 @@ def _prepareconfig(args=None, plugins=None):
213212
pluginmanager.consider_pluginarg(plugin)
214213
else:
215214
pluginmanager.register(plugin)
216-
if warning:
217-
from _pytest.warnings import _issue_warning_captured
218-
219-
_issue_warning_captured(warning, hook=config.hook, stacklevel=4)
220215
return pluginmanager.hook.pytest_cmdline_parse(
221216
pluginmanager=pluginmanager, args=args
222217
)

0 commit comments

Comments
 (0)