docstr: Calls "func" and fails if it doesn't raise the right exception
  (any exception by default). Also returns the exception in question.
docstr_tok: ["Calls","``","func","''","and","fails","if","it","does","n't","raise","the","right","exception","(","any","exception","by","default",")",".","Also","returns","the","exception","in","question","."]
code: def should_fail(self, func, exc_type=Exception):
      """Calls "func" and fails if it doesn't raise the right exception
      (any exception by default). Also returns the exception in question.
      """
      try:
          func()
          self.fail("Expected an exception of type %r" % exc_type)
      except exc_type as e:
          self.assertTrue(isinstance(e, exc_type))
          return e
  
imports: from __future__ import absolute_import
  import os
  import unittest
  import tempfile
  from .Compiler import Errors
  from .CodeWriter import CodeWriter
  from .Compiler.TreeFragment import TreeFragment, strip_common_indent
  from .Compiler.Visitor import TreeVisitor, VisitorTransform
  from .Compiler import TreePath
label_desc: Use image node_id 10 for calling the CythonTest obj's underlying member method code with example usage: obj.should_fail(func, exc_type) and returns: e