fix tests by using less likely existing import names
This commit is contained in:
parent
209140fea0
commit
c3ec2718a2
|
@ -295,8 +295,6 @@ class HookProxy:
|
||||||
def __init__(self, node):
|
def __init__(self, node):
|
||||||
self.node = node
|
self.node = node
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
if name[0] == "_":
|
|
||||||
raise AttributeError(name)
|
|
||||||
hookmethod = getattr(self.node.config.hook, name)
|
hookmethod = getattr(self.node.config.hook, name)
|
||||||
def call_matching_hooks(**kwargs):
|
def call_matching_hooks(**kwargs):
|
||||||
plugins = self.node.config._getmatchingplugins(self.node.fspath)
|
plugins = self.node.config._getmatchingplugins(self.node.fspath)
|
||||||
|
|
|
@ -85,8 +85,8 @@ class TestBootstrapping:
|
||||||
|
|
||||||
def test_import_plugin_importname(self, testdir):
|
def test_import_plugin_importname(self, testdir):
|
||||||
pluginmanager = PluginManager()
|
pluginmanager = PluginManager()
|
||||||
py.test.raises(ImportError, 'pluginmanager.import_plugin("x.y")')
|
py.test.raises(ImportError, 'pluginmanager.import_plugin("qweqwex.y")')
|
||||||
py.test.raises(ImportError, 'pluginmanager.import_plugin("pytest_x.y")')
|
py.test.raises(ImportError, 'pluginmanager.import_plugin("pytest_qweqwx.y")')
|
||||||
|
|
||||||
reset = testdir.syspathinsert()
|
reset = testdir.syspathinsert()
|
||||||
pluginname = "pytest_hello"
|
pluginname = "pytest_hello"
|
||||||
|
@ -103,8 +103,8 @@ class TestBootstrapping:
|
||||||
|
|
||||||
def test_import_plugin_dotted_name(self, testdir):
|
def test_import_plugin_dotted_name(self, testdir):
|
||||||
pluginmanager = PluginManager()
|
pluginmanager = PluginManager()
|
||||||
py.test.raises(ImportError, 'pluginmanager.import_plugin("x.y")')
|
py.test.raises(ImportError, 'pluginmanager.import_plugin("qweqwex.y")')
|
||||||
py.test.raises(ImportError, 'pluginmanager.import_plugin("pytest_x.y")')
|
py.test.raises(ImportError, 'pluginmanager.import_plugin("pytest_qweqwex.y")')
|
||||||
|
|
||||||
reset = testdir.syspathinsert()
|
reset = testdir.syspathinsert()
|
||||||
testdir.mkpydir("pkg").join("plug.py").write("x=3")
|
testdir.mkpydir("pkg").join("plug.py").write("x=3")
|
||||||
|
|
Loading…
Reference in New Issue