Test classes having operations in the setUp function as well
as individual tests annotated with run_deprecated_v1 need to
have the whole class annotated with run_deprecated_v1 to ensure
the setUp function as well as the test function is run in graph
mode.
PiperOrigin-RevId: 225964901
Skip individual test cases or entire suites that are not
running in v1. Also replace some @run_deprecated_v1
annotations since simply running the test in graph mode
was not enough.
PiperOrigin-RevId: 224604547
In order to support tests running in eager mode we need to avoid
unnecessary use of Sessions in tests. This moves to remove some
of the uses of the `run` function in favor of `evaluate`.
PiperOrigin-RevId: 223009795
self.test_session() has been deprecated in 9962eb5e84 as its name confuses readers of the test. Moving to cached_session() instead which is more explicit about:
* the fact that the session may be reused.
* the session is not closed even when doing a "with self.test_session()" statement.
PiperOrigin-RevId: 212766976