def testDestroyTemporaryVariableTwice(self):
    with self.test_session(use_gpu=True):
        var = gen_state_ops._temporary_variable([1, 2], dtypes.float32)
        val1 = gen_state_ops._destroy_temporary_variable(var, var_name='dup')
        val2 = gen_state_ops._destroy_temporary_variable(var, var_name='dup')
        final = (val1 + val2)
        with self.assertRaises(errors.NotFoundError):
            final.eval()
def testDestroyTemporaryVariableTwice(self):
    with self.test_session(use_gpu=True):
        var = gen_state_ops._temporary_variable([1, 2], dtypes.float32)
        val1 = gen_state_ops._destroy_temporary_variable(var, var_name='dup')
        val2 = gen_state_ops._destroy_temporary_variable(var, var_name='dup')
        final = (val1 + val2)
        with self.assertRaises(errors.NotFoundError):
            final.eval()