()
| 2724 | def testPreservesNameScopeInEagerExecution(self): |
| 2725 | with context.eager_mode(): |
| 2726 | def foo(): |
| 2727 | with ops.name_scope("inner"), ops.init_scope(): |
| 2728 | if context.executing_eagerly(): |
| 2729 | # A trailing slash is always appended when eager execution is |
| 2730 | # enabled. |
| 2731 | self.assertEqual(context.context().scope_name, "inner/") |
| 2732 | else: |
| 2733 | self.assertEqual(ops.get_name_scope(), "inner") |
| 2734 | |
| 2735 | foo() |
| 2736 | self.assertEqual(ops.get_name_scope(), "") |
nothing calls this directly
no test coverage detected