@test_util.run_v1_only('b/120545219')
def testControlDepsNone(self):
    with self.cached_session():
        c = constant_op.constant(1.0)
        with ops.control_dependencies([c]):
            d = constant_op.constant(2.0)
            var_x = variables.VariableV1(2.0)
        self.assertEqual([c.op], d.op.control_inputs)
        self.assertEqual([], var_x.initializer.control_inputs)
        self.assertEqual([], var_x.value().op.control_inputs)
        self.assertEqual([], var_x._ref().op.control_inputs)
@test_util.run_v1_only('b/120545219')
def testControlDepsNone(self):
    with self.cached_session():
        c = constant_op.constant(1.0)
        with ops.control_dependencies([c]):
            d = constant_op.constant(2.0)
            var_x = variables.VariableV1(2.0)
        self.assertEqual([c.op], d.op.control_inputs)
        self.assertEqual([], var_x.initializer.control_inputs)
        self.assertEqual([], var_x.value().op.control_inputs)
        self.assertEqual([], var_x._ref().op.control_inputs)