class documentation

class ControlFlowTest(absltest.TestCase): (source)

View In Hierarchy

Undocumented

Method assertExitsTo Undocumented
Method assertNotExitsTo Undocumented
Method assertNotRaisesTo Undocumented
Method assertRaisesTo Undocumented
Method assertSameBlock Undocumented
Method get_block Undocumented
Method test_control_flow_break_in_finally Undocumented
Method test_control_flow_break_in_while_loop Undocumented
Method test_control_flow_break_outside_loop Undocumented
Method test_control_flow_continue_outside_loop Undocumented
Method test_control_flow_example_class Undocumented
Method test_control_flow_exception_handling Undocumented
Method test_control_flow_for_all_test_components Undocumented
Method test_control_flow_for_all_test_components_ast_to_instruction All INSTRUCTION_AST_NODES in an AST correspond to one Instruction.
Method test_control_flow_for_loop_with_else Undocumented
Method test_control_flow_generator Undocumented
Method test_control_flow_inner_fn_while_loop Undocumented
Method test_control_flow_lambda Undocumented
Method test_control_flow_nested_while_loops Undocumented
Method test_control_flow_reads_and_writes_appear_once Asserts each read and write in an Instruction is unique in the graph.
Method test_control_flow_return_outside_function Undocumented
Method test_control_flow_simple_for_loop Undocumented
Method test_control_flow_simple_if_statement Undocumented
Method test_control_flow_simple_while_loop Undocumented
Method test_control_flow_straight_line_code Undocumented
Method test_control_flow_try_with_loop Undocumented
def assertExitsTo(self, graph, selector1, selector2): (source)

Undocumented

def assertNotExitsTo(self, graph, selector1, selector2): (source)

Undocumented

def assertNotRaisesTo(self, graph, selector1, selector2): (source)

Undocumented

def assertRaisesTo(self, graph, selector1, selector2): (source)

Undocumented

def assertSameBlock(self, graph, selector1, selector2): (source)

Undocumented

def get_block(self, graph, selector): (source)

Undocumented

def test_control_flow_break_in_finally(self): (source)

Undocumented

def test_control_flow_break_in_while_loop(self): (source)

Undocumented

def test_control_flow_break_outside_loop(self): (source)

Undocumented

def test_control_flow_continue_outside_loop(self): (source)

Undocumented

def test_control_flow_example_class(self): (source)

Undocumented

def test_control_flow_exception_handling(self): (source)

Undocumented

def test_control_flow_for_all_test_components(self): (source)

Undocumented

def test_control_flow_for_all_test_components_ast_to_instruction(self): (source)

All INSTRUCTION_AST_NODES in an AST correspond to one Instruction.

This assumes that a simple statement can't contain another simple statement. However, Yield nodes are the exception to this as they are contained within Expr nodes.

We omit Yield nodes from INSTRUCTION_AST_NODES despite them being listed as simple statements in the Python docs.

def test_control_flow_for_loop_with_else(self): (source)

Undocumented

def test_control_flow_generator(self): (source)

Undocumented

def test_control_flow_inner_fn_while_loop(self): (source)

Undocumented

def test_control_flow_lambda(self): (source)

Undocumented

def test_control_flow_nested_while_loops(self): (source)

Undocumented

def test_control_flow_reads_and_writes_appear_once(self): (source)

Asserts each read and write in an Instruction is unique in the graph.

Note that in the case of AugAssign, the same Name AST node is used once as a read and once as a write.

def test_control_flow_return_outside_function(self): (source)

Undocumented

def test_control_flow_simple_for_loop(self): (source)

Undocumented

def test_control_flow_simple_if_statement(self): (source)

Undocumented

def test_control_flow_simple_while_loop(self): (source)

Undocumented

def test_control_flow_straight_line_code(self): (source)

Undocumented

def test_control_flow_try_with_loop(self): (source)

Undocumented