class_docstr: This class tests all functions of the ArithmeticSharedTensor.
docstr: Tests that control flow fails as expected
docstr_tok: ["Tests","that","control","flow","fails","as","expected"]
code: def test_control_flow_failure(self) -> None:
      """Tests that control flow fails as expected"""
      tensor = get_random_test_tensor(is_float=True)
      encrypted_tensor = ArithmeticSharedTensor(tensor)
      with self.assertRaises(RuntimeError):
          if encrypted_tensor:
              pass
  
      with self.assertRaises(RuntimeError):
          tensor = 5 if encrypted_tensor else 0
  
      with self.assertRaises(RuntimeError):
          if False:
              pass
          elif encrypted_tensor:
              pass
  
imports: import itertools
  import logging
  import unittest
  import crypten
  import crypten.communicator
  import torch
  import torch.nn.functional
  from crypten.common.rng import generate_random_ring_element
  from crypten.common.tensor_types import is_float_tensor
  from crypten.common.util import count_wraps
  from crypten.mpc.primitives import ArithmeticSharedTensor
  from test.multiprocess_test_case import get_random_test_tensor, MultiProcessTestCase
label_desc: Use image node_id 33 for calling the TestArithmetic obj's underlying member method code with example usage: obj.test_control_flow_failure() without return types