Classes | |
class | _ParameterizedTestIter |
class | TestCase |
class | TestGeneratorMetaclass |
Functions | |
def | _CleanRepr (obj) |
def | _FormatParameterList (testcase_params) |
def | _IsSingletonList (testcases) |
def | _ModifyClass (class_object, testcases, naming_type) |
def | _NonStringIterable (obj) |
def | _ParameterDecorator (naming_type, testcases) |
def | _StrClass (cls) |
def | _UpdateClassDictForParamTestCase (dct, id_suffix, name, iterator) |
def | CoopTestCase (other_base_class) |
def | named_parameters (*testcases) |
def | parameters (*testcases) |
Variables | |
string | __author__ = 'tmarek@google.com (Torsten Marek)' |
_ARGUMENT_REPR = object() | |
_FIRST_ARG = object() | |
_SEPARATOR = uuid.uuid1().hex | |
ADDR_RE = re.compile(r'<([a-zA-Z0-9_\-\.]+) object at 0x[a-fA-F0-9]+>') | |
|
private |
Definition at line 172 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 187 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
True iff testcases contains only a single non-tuple element.
Definition at line 262 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 267 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 182 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Implementation of the parameterization decorators. Args: naming_type: The naming type. testcases: Testcase parameters. Returns: A function for modifying the decorated object.
Definition at line 286 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 178 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Adds individual test cases to a dictionary. Args: dct: The target dictionary. id_suffix: The dictionary for mapping names to test IDs. name: The original name of the test case. iterator: The iterator generating the individual test cases.
Definition at line 372 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
def google.protobuf.internal._parameterized.CoopTestCase | ( | other_base_class | ) |
Returns a new base class with a cooperative metaclass base. This enables the TestCase to be used in combination with other base classes that have custom metaclasses, such as mox.MoxTestBase. Only works with metaclasses that do not override type.__new__. Example: import google3 import mox from google3.testing.pybase import parameterized class ExampleTest(parameterized.CoopTestCase(mox.MoxTestBase)): ... Args: other_base_class: (class) A test case base class. Returns: A new class object.
Definition at line 418 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
def google.protobuf.internal._parameterized.named_parameters | ( | * | testcases | ) |
A decorator for creating parameterized tests. See the module docstring for a usage example. The first element of each parameter tuple should be a string and will be appended to the name of the test method. Args: *testcases: Parameters for the decorated method, either a single iterable, or a list of tuples. Returns: A test generator to be handled by TestGeneratorMetaclass.
Definition at line 330 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
def google.protobuf.internal._parameterized.parameters | ( | * | testcases | ) |
A decorator for creating parameterized tests. See the module docstring for a usage example. Args: *testcases: Parameters for the decorated method, either a single iterable, or a list of tuples/dicts/objects (for tests with only one argument). Returns: A test generator to be handled by TestGeneratorMetaclass.
Definition at line 315 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 146 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 169 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 168 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
|
private |
Definition at line 167 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.
google.protobuf.internal._parameterized.ADDR_RE = re.compile(r'<([a-zA-Z0-9_\-\.]+) object at 0x[a-fA-F0-9]+>') |
Definition at line 166 of file bloaty/third_party/protobuf/python/google/protobuf/internal/_parameterized.py.