class_docstr: Parameterize a test case::
  
  class TestInt(object):
      @parameterized([
          ("A", 10),
          ("F", 15),
          param("10", 42, base=42)
      ])
      def test_int(self, input, expected, base=16):
          actual = int(input, base=base)
          assert_equal(actual, expected)
  
  @parameterized([
      (2, 3, 5)
      (3, 5, 8),
  ])
  def test_add(a, b, expected):
      assert_equal(a + b, expected)
class_docstr_tok: ["Parameterize","a","test","case",":",":","class","TestInt","(","object",")",":","@","parameterized","(","[","(","``","A","''",",","10",")",",","(","``","F","''",",","15",")",",","param","(","``","10","''",",","42",",","base=42",")","]",")","def","test_int","(","self",",","input",",","expected",",","base=16",")",":","actual","=","int","(","input",",","base=base",")","assert_equal","(","actual",",","expected",")","@","parameterized","(","[","(","2",",","3",",","5",")","(","3",",","5",",","8",")",",","]",")","def","test_add","(","a",",","b",",","expected",")",":","assert_equal","(","a","+","b",",","expected",")"]
code: def __call__(self, test_func):
      self.assert_not_in_testcase_subclass()
  
      @wraps(test_func)
      def wrapper(test_self=None):
          test_cls = test_self and type(test_self)
          if test_self is not None:
              if issubclass(test_cls, InstanceType):
                  raise TypeError(
                      (
                          "@parameterized can't be used with old-style classes, but "
                          "%r has an old-style class. Consider using a new-style "
                          "class, or '@parameterized.expand' "
                          "(see http://stackoverflow.com/q/54867/71522 for more "
                          "information on old-style classes)."
                      )
                      % (test_self,)
                  )
  
          original_doc = wrapper.__doc__
          for num, args in enumerate(wrapper.parameterized_input):
              p = param.from_decorator(args)
              unbound_func, nose_tuple = self.param_as_nose_tuple(
                  test_self, test_func, num, p
              )
              try:
                  wrapper.__doc__ = nose_tuple[0].__doc__
                  # Nose uses `getattr(instance, test_func.__name__)` to get
                  # a method bound to the test instance (as opposed to a
                  # method bound to the instance of the class created when
                  # tests were being enumerated). Set a value here to make
                  # sure nose can get the correct test method.
                  if test_self is not None:
                      setattr(
                          test_cls, test_func.__name__, unbound_func
                      )
                  yield nose_tuple
              finally:
                  if test_self is not None:
                      delattr(test_cls, test_func.__name__)
                  wrapper.__doc__ = original_doc
  
      input = self.get_input()
      if not input:
          if not self.skip_on_empty:
              raise ValueError(
                  "Parameters iterable is empty (hint: use "
                  "`parameterized([], skip_on_empty=True)` to skip "
                  "this test when the input is empty)"
              )
          wrapper = wraps(test_func)(skip_on_empty_helper)
  
      wrapper.parameterized_input = input
      wrapper.parameterized_func = test_func
      test_func.__name__ = "_parameterized_original_%s" % (
          test_func.__name__,
      )
  
      return wrapper
  
imports: import re
  import sys
  import inspect
  import warnings
  from typing import Iterable
  from functools import wraps
  from types import MethodType
  from collections import namedtuple
  from unittest import TestCase
label_desc: Use image node_id 2 for calling the parameterized obj's underlying member method code with example usage: obj.__call__(test_func) and returns: wrapper