class documentation

class param(_param):

View In Hierarchy

Represents a single parameter to a test case.

For example:

>>> p = param("foo", bar=16)
>>> p
param("foo", bar=16)
>>> p.args
('foo', )
>>> p.kwargs
{'bar': 16}

Intended to be used as an argument to @parameterized:

@parameterized([
    param("foo", bar=16),
])
def test_stuff(foo, bar=16):
    pass
Class Method explicit Creates a param by explicitly specifying args and kwargs:
Class Method from​_decorator Returns an instance of param() for @parameterized argument args:
Method __new__ Undocumented
Method __repr__ Undocumented
@classmethod
def explicit(cls, args=None, kwargs=None):

Creates a param by explicitly specifying args and kwargs:

>>> param.explicit([1,2,3])
param(*(1, 2, 3))
>>> param.explicit(kwargs={"foo": 42})
param(*(), **{"foo": "42"})
@classmethod
def from_decorator(cls, args):

Returns an instance of param() for @parameterized argument args:

>>> param.from_decorator((42, ))
param(args=(42, ), kwargs={})
>>> param.from_decorator("foo")
param(args=("foo", ), kwargs={})
def __new__(cls, *args, **kwargs):

Undocumented

def __repr__(self):

Undocumented