<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/framework/test_util.py#L1304-L1325) |

Returns the same class. This will be removed once all usages are removed.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.test.with_eager_op_as_function`](https://www.tensorflow.org/api_docs/python/tf/test/with_eager_op_as_function)

<br />

    tf.test.with_eager_op_as_function(
        cls: Optional[type[_T]] = None, only_as_function: bool = False
    ) -> Union[Callable[[type[_T]], type[_T]], type[_T]]

<br />

<br />

<br />

| ## Args ||
|---|---|
| `cls` | class to decorate. |
| `only_as_function` | unused argument. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| cls ||

<br />