Also blacklist pytest-capturelog plugin

This is the older plugin before pytest-catchlog was around. Apparently there are
people still using it.

Fixes #3004
This commit is contained in:
Florian Bruhin
2017-12-05 20:02:56 +01:00
parent 2e8b0a83fe
commit ce30896cd2
3 changed files with 10 additions and 7 deletions

View File

@@ -242,9 +242,10 @@ class PytestPluginManager(PluginManager):
return opts
def register(self, plugin, name=None):
if name == 'pytest_catchlog':
self._warn('pytest-catchlog plugin has been merged into the core, '
'please remove it from your requirements.')
if name in ['pytest_catchlog', 'pytest_capturelog']:
self._warn('{0} plugin has been merged into the core, '
'please remove it from your requirements.'.format(
name.replace('_', '-')))
return
ret = super(PytestPluginManager, self).register(plugin, name)
if ret: