added option to unicode plugin name

This commit is contained in:
reut 2017-04-05 13:03:11 +00:00
parent 2a130daae6
commit 417b54abed
1 changed files with 2 additions and 1 deletions

View File

@ -415,7 +415,8 @@ class PytestPluginManager(PluginManager):
# "terminal" or "capture". Those plugins are registered under their
# basename for historic purposes but must be imported with the
# _pytest prefix.
assert isinstance(modname, str), "module name as string required, got %r" % modname
assert isinstance(modname, (py.builtin.text, str)), "module name as text required, got %r" % modname
modname = str(modname)
if self.get_plugin(modname) is not None:
return
if modname in builtin_plugins: