code: def test_plugin_getattr_raises_errors():
      """Pluggy must be able to handle plugins which raise weird exceptions
      when getattr() gets called (#11).
      """
  
      class DontTouchMe(object):
          def __getattr__(self, x):
              raise Exception("cant touch me")
  
      class Module(object):
          pass
  
      module = Module()
      module.x = DontTouchMe()
  
      pm = PluginManager(hookspec.project_name)
      # register() would raise an error
      pm.register(module, "donttouch")
      assert pm.get_plugin("donttouch") is module
  
imports: import warnings
  import pytest
  from pluggy import PluginManager, HookimplMarker, HookspecMarker
label_desc: Use image node_id 3 for calling a global function with example usage: test_plugin_getattr_raises_errors() without return types