# tf.test.with_eager_op_as_function

<br />

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

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=None, only_as_function=False
    )

<br />

<br />

<br />

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

<br />

<br />

<br />

<br />

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

<br />