code: def test_raises_exceptions(recwarn, code):
      """Exceptions raise, and warnings warn"""
      res = DummyResource()
      res.set_exception_type(code)
      try:
          res.raise_exception()
      except exceptions.WandException as e:
          assert not e.__class__.__name__.endswith("Warning")
          assert str(e) == "Dummy exception"
      else:
          w = recwarn.pop()
          assert w.category.__name__.endswith("Warning")
          assert "Dummy exception" in str(w.message)
          assert recwarn.list == []
  
file_path: wand/tests/_resource_test.py
imports: from pytest import mark
  from wand import exceptions, resource
label_desc: Use image node_id 1 for calling a global function with example usage: test_raises_exceptions(recwarn, code) without return types