class param(_param):
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 |
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"})