@@ -18,12 +18,12 @@ Usage
1818This module provides two decorators and a constructor: a class decorator named
1919``parameterizable ``, a method decorator named ``parameters ``, and a parameter
2020list constructor named ``C `` (short for 'call specification'). In order for
21- the parameters decorator to do anything useful, the test class must be
22- decorated with the parameterizable decorator.
21+ the `` parameters `` decorator to do anything useful, the test class must be
22+ decorated with the `` parameterizable `` decorator.
2323
24- parameterizable is a simple class decorator that takes no arguments.
24+ `` parameterizable `` is a simple class decorator that takes no arguments.
2525
26- Parameter list specifications are simply parameter lists passed to the
26+ Parameter list specifications are normal function call arguments, passed to the
2727constructor C. Thus, if we want to pass two positional arguments to our
2828parameterized test, we write::
2929
@@ -33,7 +33,7 @@ If we also want to pass the keyword argument ``foo``, we write::
3333
3434 C(1, 2, foo=3)
3535
36- Parameter list specifications can be passed to the parameters decorator as
36+ Parameter list specifications can be passed to the `` parameters `` decorator as
3737positional arguments, as keyword arguments, or as single argument lists or
3838dicts. That is, all of the following result in the specified parameters being
3939passed to the decorated test function::
@@ -48,14 +48,14 @@ passed to the decorated test function::
4848 @parameters(params)
4949 @parameters(**params)
5050
51- The reason all of these forms is supported is that it is more natural to use
52- positional or keyword arguments when using a single set of parameter lists for
53- a single test function, while it is more natural to pass s single argument list
54- or dict to the parameters decorator when the same set of parameter lists is
55- being passed to more than one test .
51+ The reason all of these forms is supported is that it is more natural to pass
52+ positional or keyword arguments to `` parameters `` when specifying parameter
53+ list specifications for a single test function, while it is more natural to
54+ pass a single-argument list or dict to `` parameters `` when a set of parameter
55+ list specifications is being re-used with multiple tests .
5656
57- The difference between positional arguments or a list, and keyword arguments
58- or a dict, is in how the test names are generated. If the above parameter
57+ The difference between positional arguments ( or a list) , and keyword arguments
58+ ( or a dict) , is in how the test names are generated. If the above parameter
5959lists were being used to decorate a test function named ``test_foo ``,
6060the first set above would generate tests named::
6161
@@ -75,13 +75,13 @@ set PYTHONHASHSEED, because otherwise the keyword parameters could be in a
7575different order in the name from run to run.)
7676
7777You can also specify the special keyword argument ``_include_key `` to
78- ``@parameterize ``, in which case the key that names the parameter list is
79- passed as the first non-self argument to the test::
78+ ``parameters ``, in which case the key that names the parameter list
79+ specification is passed as the first non-self argument to the test::
8080
8181 @parameters(a=C(1, 2), b=C(3, 4), _include_key=True)
8282 def test_foo(self, key, arg1, arg2):
8383 pass
8484
85- key here will be ``a `` when ``arg1 `` and ``arg2 `` are ``(1, 2) ``, and ``b ``
85+ `` key `` here will be ``a `` when ``arg1 `` and ``arg2 `` are ``(1, 2) ``, and ``b ``
8686when they are ``(3, 4) ``.
8787
0 commit comments