(self)
| 3112 | |
| 3113 | @test_util.run_deprecated_v1 |
| 3114 | def testBasic(self): |
| 3115 | a = constant_op.constant([2.0], name="a") |
| 3116 | with ops.colocate_with(a.op): |
| 3117 | b = constant_op.constant(3.0) |
| 3118 | c = constant_op.constant(4.0) |
| 3119 | self.assertEqual([b"loc:@a"], a.op.colocation_groups()) |
| 3120 | self.assertEqual([b"loc:@a"], b.op.colocation_groups()) |
| 3121 | with self.assertRaises(ValueError): |
| 3122 | c.op.get_attr("_class") |
| 3123 | |
| 3124 | @test_util.run_deprecated_v1 |
| 3125 | def testBasicColocationMetadata(self): |
nothing calls this directly
no test coverage detected