# Module: tff.test

<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) |

Libraries for testing TensorFlow Federated.

## Functions

[`assert_contains_secure_aggregation(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_contains_secure_aggregation): Asserts that `comp` contains at least one secure aggregation call.

[`assert_contains_unsecure_aggregation(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_contains_unsecure_aggregation): Asserts that `comp` contains at least one unsecure aggregation call.

[`assert_not_contains_secure_aggregation(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_not_contains_secure_aggregation): Asserts that `comp` contains no secure aggregation calls.

[`assert_not_contains_unsecure_aggregation(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_not_contains_unsecure_aggregation): Asserts that `comp` contains no unsecure aggregation calls.

[`assert_type_assignable_from(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_type_assignable_from): Asserts that `target_type` is assignable from `source_type`.

[`assert_types_equivalent(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_types_equivalent): Asserts that the types are equivalent.

[`assert_types_identical(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/assert_types_identical): Asserts that the types are identical.

[`create_runtime_error_context(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/create_runtime_error_context): Creates a context that will raise an error when computations are invoked.

[`set_no_default_context(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/set_no_default_context): Places a `RuntimeErrorContext` at the bottom of the stack.

[`with_context(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/with_context): Returns a decorator for running a test in a context.

[`with_contexts(...)`](https://www.tensorflow.org/federated/api_docs/python/tff/test/with_contexts): Returns a decorator for parameterizing a test by a context.