# HG changeset patch -- Bitbucket.org
# Project pytest
# URL http://bitbucket.org/hpk42/pytest/overview
# User holger krekel <hol...@merlinux.eu>
# Date 1288568324 -3600
# Node ID b9dba72b749a3bba95083da8bef0b5a562ca6e9f
# Parent  ad3773acb10a58745b9919cc37d4d720ef2ed971
fix tests by using less likely existing import names

--- a/testing/test_pluginmanager.py
+++ b/testing/test_pluginmanager.py
@@ -85,8 +85,8 @@ class TestBootstrapping:
 
     def test_import_plugin_importname(self, testdir):
         pluginmanager = PluginManager()
-        py.test.raises(ImportError, 'pluginmanager.import_plugin("x.y")')
-        py.test.raises(ImportError, 
'pluginmanager.import_plugin("pytest_x.y")')
+        py.test.raises(ImportError, 'pluginmanager.import_plugin("qweqwex.y")')
+        py.test.raises(ImportError, 
'pluginmanager.import_plugin("pytest_qweqwx.y")')
 
         reset = testdir.syspathinsert()
         pluginname = "pytest_hello"
@@ -103,8 +103,8 @@ class TestBootstrapping:
 
     def test_import_plugin_dotted_name(self, testdir):
         pluginmanager = PluginManager()
-        py.test.raises(ImportError, 'pluginmanager.import_plugin("x.y")')
-        py.test.raises(ImportError, 
'pluginmanager.import_plugin("pytest_x.y")')
+        py.test.raises(ImportError, 'pluginmanager.import_plugin("qweqwex.y")')
+        py.test.raises(ImportError, 
'pluginmanager.import_plugin("pytest_qweqwex.y")')
 
         reset = testdir.syspathinsert()
         testdir.mkpydir("pkg").join("plug.py").write("x=3")

--- a/pytest/plugin/session.py
+++ b/pytest/plugin/session.py
@@ -295,8 +295,6 @@ class HookProxy:
     def __init__(self, node):
         self.node = node
     def __getattr__(self, name):
-        if name[0] == "_":
-            raise AttributeError(name)
         hookmethod = getattr(self.node.config.hook, name)
         def call_matching_hooks(**kwargs):
             plugins = self.node.config._getmatchingplugins(self.node.fspath)
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to