From 417b54abed921e4520b435cfcc87f342d376a278 Mon Sep 17 00:00:00 2001 From: reut Date: Wed, 5 Apr 2017 13:03:11 +0000 Subject: [PATCH] added option to unicode plugin name --- _pytest/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_pytest/config.py b/_pytest/config.py index db37280ca..306d9a123 100644 --- a/_pytest/config.py +++ b/_pytest/config.py @@ -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: