# tff.test.with_contexts

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

Returns a decorator for parameterizing a test by a context.

    tff.test.with_contexts(
        *named_contexts
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `*named_contexts` | Named parameters used to construct the `with_context` decorator; either a single iterable, or a list of `tuple`s or `dict`s. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | If no named contexts are passed to the decorator. |

<br />