Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def flaky_plugin(mock_io):
# pylint:disable=unused-argument
return FlakyPlugin()
printed by the plugin's report method.
"""
self._stream.writelines([
ensure_unicode_string(test_callable_name),
message,
'\n\t',
ensure_unicode_string(err[0]),
'\n\t',
ensure_unicode_string(err[1]),
'\n\t',
ensure_unicode_string(err[2]),
'\n',
])
PLUGIN = FlakyPlugin()
# pytest only processes hooks defined on the module
# find all hooks defined on the plugin class and copy them to the module globals
for _pytest_hook in dir(PLUGIN):
if _pytest_hook.startswith('pytest_'):
globals()[_pytest_hook] = getattr(PLUGIN, _pytest_hook)