Skip to content

Commit 9b0ad82

Browse files
committed
Python: Add test of nested classes
1 parent 9d5cf0b commit 9b0ad82

File tree

1 file changed

+11
-0
lines changed
  • python/ql/test/experimental/dataflow/fieldflow

1 file changed

+11
-0
lines changed

python/ql/test/experimental/dataflow/fieldflow/test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,17 @@ def test_class_override():
309309
SINK(WithTuple2.my_tuple[0]) # $ MISSING: flow="SOURCE, l:-10 -> WithTuple2.my_tuple[0]"
310310
SINK(inst.my_tuple[0]) # $ MISSING: flow="SOURCE, l:-11 -> inst.my_tuple[0]"
311311

312+
313+
class Outer:
314+
src = SOURCE
315+
class Inner:
316+
src = SOURCE
317+
318+
@expects(2) # $ unresolved_call=expects(..) unresolved_call=expects(..)(..)
319+
def test_nested_class():
320+
SINK(Outer.src) # $ flow="SOURCE, l:-6 -> Outer.src"
321+
SINK(Outer.Inner.src) # $ flow="SOURCE, l:-5 -> Outer.Inner.src"
322+
312323
# --------------------------------------
313324
# unique classes from functions
314325
# --------------------------------------

0 commit comments

Comments
 (0)