Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4440e02

Browse files
committed
Add test case for divergence.
1 parent 1b43207 commit 4440e02

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

python/ql/test/3/library-tests/PointsTo/typehints/Values.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@
1010
| test.py:6:1:6:20 | test.py:6 | ControlFlowNode for FunctionExpr | import | test.py:6:1:6:20 | Function bar |
1111
| test.py:6:11:6:13 | test.py:6 | ControlFlowNode for set | import | file://:0:0:0:0 | builtin-class set |
1212
| test.py:6:17:6:19 | test.py:6 | ControlFlowNode for Set | import | ../../lib/typing.py:23:1:23:23 | class Set |
13+
| test.py:11:1:11:12 | test.py:11 | ControlFlowNode for ClassExpr | import | test.py:11:1:11:12 | class baz |
14+
| test.py:14:7:14:10 | test.py:14 | ControlFlowNode for True | import | file://:0:0:0:0 | bool True |
15+
| test.py:15:11:15:13 | test.py:15 | ControlFlowNode for baz | import | file://:0:0:0:0 | class baz[class baz] |
16+
| test.py:15:11:15:13 | test.py:15 | ControlFlowNode for baz | import | test.py:11:1:11:12 | class baz |
17+
| test.py:15:11:15:18 | test.py:15 | ControlFlowNode for Subscript | import | file://:0:0:0:0 | class baz[class baz] |
18+
| test.py:15:15:15:17 | test.py:15 | ControlFlowNode for baz | import | file://:0:0:0:0 | class baz[class baz] |
19+
| test.py:15:15:15:17 | test.py:15 | ControlFlowNode for baz | import | test.py:11:1:11:12 | class baz |

python/ql/test/3/library-tests/PointsTo/typehints/test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@ def foo(x:Optional[int]) -> int:
55

66
def bar(s:set)->Set:
77
pass
8+
9+
10+
# ODASA-8075
11+
class baz():
12+
pass
13+
14+
while True:
15+
baz = baz[baz]

0 commit comments

Comments
 (0)