From 5433907c331a1dd0d7bb7a28df7114cd1ccf9c91 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Tue, 7 Nov 2023 15:49:14 +0100 Subject: [PATCH] Python: Accept more test changes All are for the better :tada: --- python/ql/test/experimental/dataflow/coverage/test.py | 4 ++-- python/ql/test/experimental/dataflow/match/test.py | 2 +- .../test/library-tests/PointsTo/new/ImpliesDataflow.expected | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/python/ql/test/experimental/dataflow/coverage/test.py b/python/ql/test/experimental/dataflow/coverage/test.py index 9a26b8dd69f..48e56200f2b 100644 --- a/python/ql/test/experimental/dataflow/coverage/test.py +++ b/python/ql/test/experimental/dataflow/coverage/test.py @@ -338,9 +338,9 @@ class C: @expects(2) def test_attribute_reference(): - SINK(C.a) #$ MISSING:flow="SOURCE, l:-4 -> C.a" + SINK(C.a) # $ flow="SOURCE, l:-5 -> C.a" c = C() - SINK(c.a) #$ MISSING:flow="SOURCE, l:-6 -> c.a" + SINK(c.a) # $ MISSING: flow="SOURCE, l:-7 -> c.a" # overriding __getattr__ should be tested by the class coverage tests diff --git a/python/ql/test/experimental/dataflow/match/test.py b/python/ql/test/experimental/dataflow/match/test.py index fb58306104e..abdeaa2ee7c 100644 --- a/python/ql/test/experimental/dataflow/match/test.py +++ b/python/ql/test/experimental/dataflow/match/test.py @@ -64,7 +64,7 @@ class Unsafe: def test_value_pattern(): match SOURCE: case Unsafe.VALUE as x: - SINK(x) #$ flow="SOURCE, l:-2 -> x" MISSING: flow="SOURCE, l:-5 -> x" + SINK(x) #$ flow="SOURCE, l:-2 -> x" flow="SOURCE, l:-5 -> x" @expects(2) def test_sequence_pattern_tuple(): diff --git a/python/ql/test/library-tests/PointsTo/new/ImpliesDataflow.expected b/python/ql/test/library-tests/PointsTo/new/ImpliesDataflow.expected index 0c2bd1b4ce0..96663031d9a 100644 --- a/python/ql/test/library-tests/PointsTo/new/ImpliesDataflow.expected +++ b/python/ql/test/library-tests/PointsTo/new/ImpliesDataflow.expected @@ -3,9 +3,5 @@ | code/l_calls.py:12:1:12:20 | ControlFlowNode for ClassExpr | code/l_calls.py:16:16:16:18 | ControlFlowNode for cls | | code/l_calls.py:12:1:12:20 | ControlFlowNode for ClassExpr | code/l_calls.py:24:13:24:22 | ControlFlowNode for Attribute() | | code/l_calls.py:12:1:12:20 | ControlFlowNode for ClassExpr | code/l_calls.py:25:16:25:16 | ControlFlowNode for a | -| code/l_calls.py:33:5:33:23 | ControlFlowNode for FunctionExpr | code/l_calls.py:39:1:39:3 | ControlFlowNode for Attribute | -| code/l_calls.py:48:5:48:30 | ControlFlowNode for FunctionExpr | code/l_calls.py:53:1:53:3 | ControlFlowNode for Attribute | -| code/q_super.py:48:5:48:17 | ControlFlowNode for ClassExpr | code/q_super.py:51:25:51:29 | ControlFlowNode for Attribute | -| code/q_super.py:63:5:63:17 | ControlFlowNode for ClassExpr | code/q_super.py:66:19:66:23 | ControlFlowNode for Attribute | | code/t_type.py:3:1:3:16 | ControlFlowNode for ClassExpr | code/t_type.py:6:1:6:9 | ControlFlowNode for type() | | code/t_type.py:3:1:3:16 | ControlFlowNode for ClassExpr | code/t_type.py:13:5:13:13 | ControlFlowNode for type() |