Python: Add test for tuple unpacking with "complicated" value.

This commit is contained in:
Taus Brock-Nannestad
2020-02-27 17:34:32 +01:00
parent 7a3895d661
commit 5bbf93241b
9 changed files with 40 additions and 0 deletions

View File

@@ -62,6 +62,8 @@
| a_simple.py:49 | g_0 = a |
| a_simple.py:49 | h_0 = b |
| a_simple.py:49 | i_0 = c |
| a_simple.py:53 | l_0 = BinaryExpr[0] |
| a_simple.py:53 | m_0 = BinaryExpr[1] |
| b_condition.py:0 | __name___0 = ScopeEntryDefinition |
| b_condition.py:0 | __package___0 = ScopeEntryDefinition |
| b_condition.py:0 | double_attr_check_0 = ScopeEntryDefinition |

View File

@@ -45,6 +45,8 @@
| a_simple.py:49 | Local Variable g | AssignmentDefinition |
| a_simple.py:49 | Local Variable h | AssignmentDefinition |
| a_simple.py:49 | Local Variable i | AssignmentDefinition |
| a_simple.py:53 | Local Variable l | MultiAssignmentDefinition |
| a_simple.py:53 | Local Variable m | MultiAssignmentDefinition |
| b_condition.py:0 | Global Variable __name__ | ScopeEntryDefinition |
| b_condition.py:0 | Global Variable __package__ | ScopeEntryDefinition |
| b_condition.py:0 | Global Variable double_attr_check | ScopeEntryDefinition |

View File

@@ -68,6 +68,13 @@ WARNING: Predicate points_to has been deprecated and may be removed in future (P
| a_simple.py:49 | ControlFlowNode for i | 'c' | builtin-class str | 38 | runtime |
| a_simple.py:51 | ControlFlowNode for h | 'b' | builtin-class str | 38 | runtime |
| a_simple.py:52 | ControlFlowNode for i | 'c' | builtin-class str | 38 | runtime |
| a_simple.py:53 | ControlFlowNode for BinaryExpr | BinaryExpr | builtin-class tuple | 53 | runtime |
| a_simple.py:53 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 53 | runtime |
| a_simple.py:53 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 53 | runtime |
| a_simple.py:53 | ControlFlowNode for Tuple | BinaryExpr | builtin-class tuple | 53 | runtime |
| a_simple.py:53 | ControlFlowNode for Tuple | Tuple | builtin-class tuple | 53 | runtime |
| a_simple.py:54 | ControlFlowNode for l | l | builtin-class object | 53 | runtime |
| a_simple.py:55 | ControlFlowNode for m | m | builtin-class object | 53 | runtime |
| b_condition.py:4 | ControlFlowNode for FunctionExpr | Function f | builtin-class function | 4 | import |
| b_condition.py:4 | ControlFlowNode for f | Function f | builtin-class function | 4 | import |
| b_condition.py:5 | ControlFlowNode for IfExp | NoneType None | builtin-class NoneType | 5 | runtime |

View File

@@ -68,6 +68,13 @@ WARNING: Predicate points_to has been deprecated and may be removed in future (P
| a_simple.py:49 | ControlFlowNode for i | 'c' | builtin-class str | 38 |
| a_simple.py:51 | ControlFlowNode for h | 'b' | builtin-class str | 38 |
| a_simple.py:52 | ControlFlowNode for i | 'c' | builtin-class str | 38 |
| a_simple.py:53 | ControlFlowNode for BinaryExpr | BinaryExpr | builtin-class tuple | 53 |
| a_simple.py:53 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int | 53 |
| a_simple.py:53 | ControlFlowNode for IntegerLiteral | int 2 | builtin-class int | 53 |
| a_simple.py:53 | ControlFlowNode for Tuple | BinaryExpr | builtin-class tuple | 53 |
| a_simple.py:53 | ControlFlowNode for Tuple | Tuple | builtin-class tuple | 53 |
| a_simple.py:54 | ControlFlowNode for l | l | builtin-class object | 53 |
| a_simple.py:55 | ControlFlowNode for m | m | builtin-class object | 53 |
| b_condition.py:4 | ControlFlowNode for FunctionExpr | Function f | builtin-class function | 4 |
| b_condition.py:4 | ControlFlowNode for f | Function f | builtin-class function | 4 |
| b_condition.py:5 | ControlFlowNode for IfExp | NoneType None | builtin-class NoneType | 5 |

View File

@@ -46,6 +46,8 @@
| a_simple.py:38 | Local Variable g | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable h | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable i | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable l | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable m | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable p | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable q | Entry node for Function multi_assign_and_packing | definition |
| a_simple.py:38 | Local Variable r | Entry node for Function multi_assign_and_packing | definition |
@@ -65,6 +67,8 @@
| a_simple.py:49 | Local Variable g | ControlFlowNode for g | definition |
| a_simple.py:49 | Local Variable h | ControlFlowNode for h | definition |
| a_simple.py:49 | Local Variable i | ControlFlowNode for i | definition |
| a_simple.py:53 | Local Variable l | ControlFlowNode for l | definition |
| a_simple.py:53 | Local Variable m | ControlFlowNode for m | definition |
| b_condition.py:0 | Global Variable __name__ | Entry node for Module code.b_condition | definition |
| b_condition.py:0 | Global Variable __package__ | Entry node for Module code.b_condition | definition |
| b_condition.py:0 | Global Variable double_attr_check | Entry node for Module code.b_condition | definition |

View File

@@ -62,6 +62,8 @@
| a_simple.py:38 | g_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | h_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | i_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | l_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | m_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | p_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | q_0 | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | r_0 | Exit node for Function multi_assign_and_packing |
@@ -87,6 +89,8 @@
| a_simple.py:50 | g_0 | ControlFlowNode for g |
| a_simple.py:51 | h_0 | ControlFlowNode for h |
| a_simple.py:52 | i_0 | ControlFlowNode for i |
| a_simple.py:54 | l_0 | ControlFlowNode for l |
| a_simple.py:55 | m_0 | ControlFlowNode for m |
| b_condition.py:0 | __name___0 | Exit node for Module code.b_condition |
| b_condition.py:0 | __package___0 | Exit node for Module code.b_condition |
| b_condition.py:0 | double_attr_check_1 | Exit node for Module code.b_condition |

View File

@@ -54,6 +54,13 @@
| a_simple.py:49 | ControlFlowNode for c | runtime | 'c' | builtin-class str |
| a_simple.py:51 | ControlFlowNode for h | runtime | 'b' | builtin-class str |
| a_simple.py:52 | ControlFlowNode for i | runtime | 'c' | builtin-class str |
| a_simple.py:53 | ControlFlowNode for BinaryExpr | runtime | instance of tuple | builtin-class tuple |
| a_simple.py:53 | ControlFlowNode for IntegerLiteral | runtime | int 1 | builtin-class int |
| a_simple.py:53 | ControlFlowNode for IntegerLiteral | runtime | int 2 | builtin-class int |
| a_simple.py:53 | ControlFlowNode for Tuple | runtime | (int 1, ) | builtin-class tuple |
| a_simple.py:53 | ControlFlowNode for Tuple | runtime | (int 2, ) | builtin-class tuple |
| a_simple.py:54 | ControlFlowNode for l | runtime | instance of object | builtin-class object |
| a_simple.py:55 | ControlFlowNode for m | runtime | instance of object | builtin-class object |
| b_condition.py:4 | ControlFlowNode for FunctionExpr | import | Function f | builtin-class function |
| b_condition.py:5 | ControlFlowNode for IfExp | runtime | None | builtin-class NoneType |
| b_condition.py:5 | ControlFlowNode for None | runtime | None | builtin-class NoneType |

View File

@@ -47,6 +47,8 @@
| a_simple.py:38 | g | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | h | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | i | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | l | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | m | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | p | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | q | Exit node for Function multi_assign_and_packing |
| a_simple.py:38 | r | Exit node for Function multi_assign_and_packing |
@@ -72,6 +74,8 @@
| a_simple.py:50 | g | ControlFlowNode for g |
| a_simple.py:51 | h | ControlFlowNode for h |
| a_simple.py:52 | i | ControlFlowNode for i |
| a_simple.py:54 | l | ControlFlowNode for l |
| a_simple.py:55 | m | ControlFlowNode for m |
| b_condition.py:0 | Exception | Exit node for Module code.b_condition |
| b_condition.py:0 | TypeError | Exit node for Module code.b_condition |
| b_condition.py:0 | __name__ | Exit node for Module code.b_condition |

View File

@@ -50,3 +50,6 @@ def multi_assign_and_packing(a, b="b", c="c"):
g
h
i
l, m = (1,) + (2,)
l
m