Skip to content

Commit dc91406

Browse files
committed
Python: make .expected empty
still need to annotate missing results
1 parent e468d49 commit dc91406

File tree

2 files changed

+33
-66
lines changed

2 files changed

+33
-66
lines changed
Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +0,0 @@
1-
| classes.py:556:15:556:17 | ControlFlowNode for key | Unexpected result: arg2="ControlFlowNode for arg2, l:565 -> ControlFlowNode for key" |
2-
| classes.py:557:15:557:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_getitem, l:563 -> ControlFlowNode for self" |
3-
| classes.py:571:15:571:19 | ControlFlowNode for value | Unexpected result: arg3="ControlFlowNode for arg3, l:581 -> ControlFlowNode for value" |
4-
| classes.py:572:15:572:17 | ControlFlowNode for key | Unexpected result: arg2="ControlFlowNode for arg2, l:581 -> ControlFlowNode for key" |
5-
| classes.py:573:15:573:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_setitem, l:578 -> ControlFlowNode for self" |
6-
| classes.py:587:15:587:17 | ControlFlowNode for key | Unexpected result: arg2="ControlFlowNode for arg2, l:595 -> ControlFlowNode for key" |
7-
| classes.py:588:15:588:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_delitem, l:593 -> ControlFlowNode for self" |
8-
| classes.py:658:15:658:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:667 -> ControlFlowNode for other" |
9-
| classes.py:659:15:659:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_add, l:665 -> ControlFlowNode for self" |
10-
| classes.py:673:15:673:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:682 -> ControlFlowNode for other" |
11-
| classes.py:674:15:674:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_sub, l:680 -> ControlFlowNode for self" |
12-
| classes.py:688:15:688:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:697 -> ControlFlowNode for other" |
13-
| classes.py:689:15:689:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_mul, l:695 -> ControlFlowNode for self" |
14-
| classes.py:703:15:703:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:712 -> ControlFlowNode for other" |
15-
| classes.py:704:15:704:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_matmul, l:710 -> ControlFlowNode for self" |
16-
| classes.py:718:15:718:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:727 -> ControlFlowNode for other" |
17-
| classes.py:719:15:719:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_truediv, l:725 -> ControlFlowNode for self" |
18-
| classes.py:733:15:733:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:742 -> ControlFlowNode for other" |
19-
| classes.py:734:15:734:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_floordiv, l:740 -> ControlFlowNode for self" |
20-
| classes.py:748:15:748:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:757 -> ControlFlowNode for other" |
21-
| classes.py:749:15:749:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_mod, l:755 -> ControlFlowNode for self" |
22-
| classes.py:778:15:778:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:793 -> ControlFlowNode for other" |
23-
| classes.py:779:15:779:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_pow, l:791 -> ControlFlowNode for self" |
24-
| classes.py:799:15:799:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:808 -> ControlFlowNode for other" |
25-
| classes.py:800:15:800:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_lshift, l:806 -> ControlFlowNode for self" |
26-
| classes.py:814:15:814:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:823 -> ControlFlowNode for other" |
27-
| classes.py:815:15:815:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_rshift, l:821 -> ControlFlowNode for self" |
28-
| classes.py:829:15:829:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:838 -> ControlFlowNode for other" |
29-
| classes.py:830:15:830:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_and, l:836 -> ControlFlowNode for self" |
30-
| classes.py:844:15:844:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:853 -> ControlFlowNode for other" |
31-
| classes.py:845:15:845:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_xor, l:851 -> ControlFlowNode for self" |
32-
| classes.py:859:15:859:19 | ControlFlowNode for other | Unexpected result: arg2="ControlFlowNode for arg2, l:868 -> ControlFlowNode for other" |
33-
| classes.py:860:15:860:18 | ControlFlowNode for self | Unexpected result: arg1="SSA variable with_or, l:866 -> ControlFlowNode for self" |

python/ql/test/experimental/dataflow/coverage/classes.py

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ def test_length_hint():
553553
# object.__getitem__(self, key)
554554
class With_getitem:
555555
def __getitem__(self, key):
556-
SINK2(key)
557-
SINK1(self)
556+
SINK2(key) #$ arg2="ControlFlowNode for arg2, l:565 -> ControlFlowNode for key"
557+
SINK1(self) #$ arg1="SSA variable with_getitem, l:563 -> ControlFlowNode for self"
558558
OK()
559559
return ""
560560

@@ -568,9 +568,9 @@ def test_getitem():
568568
# object.__setitem__(self, key, value)
569569
class With_setitem:
570570
def __setitem__(self, key, value):
571-
SINK3(value)
572-
SINK2(key)
573-
SINK1(self)
571+
SINK3(value) #$ arg3="ControlFlowNode for arg3, l:581 -> ControlFlowNode for value"
572+
SINK2(key) #$ arg2="ControlFlowNode for arg2, l:581 -> ControlFlowNode for key"
573+
SINK1(self) #$ arg1="SSA variable with_setitem, l:578 -> ControlFlowNode for self"
574574
OK()
575575

576576

@@ -584,8 +584,8 @@ def test_setitem():
584584
# object.__delitem__(self, key)
585585
class With_delitem:
586586
def __delitem__(self, key):
587-
SINK2(key)
588-
SINK1(self)
587+
SINK2(key) #$ arg2="ControlFlowNode for arg2, l:595 -> ControlFlowNode for key"
588+
SINK1(self) #$ arg1="SSA variable with_delitem, l:593 -> ControlFlowNode for self"
589589
OK()
590590

591591

@@ -655,8 +655,8 @@ def test_contains():
655655
# object.__add__(self, other)
656656
class With_add:
657657
def __add__(self, other):
658-
SINK2(other)
659-
SINK1(self)
658+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:667 -> ControlFlowNode for other"
659+
SINK1(self) #$ arg1="SSA variable with_add, l:665 -> ControlFlowNode for self"
660660
OK()
661661
return self
662662

@@ -670,8 +670,8 @@ def test_add():
670670
# object.__sub__(self, other)
671671
class With_sub:
672672
def __sub__(self, other):
673-
SINK2(other)
674-
SINK1(self)
673+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:682 -> ControlFlowNode for other"
674+
SINK1(self) #$ arg1="SSA variable with_sub, l:680 -> ControlFlowNode for self"
675675
OK()
676676
return self
677677

@@ -685,8 +685,8 @@ def test_sub():
685685
# object.__mul__(self, other)
686686
class With_mul:
687687
def __mul__(self, other):
688-
SINK2(other)
689-
SINK1(self)
688+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:697 -> ControlFlowNode for other"
689+
SINK1(self) #$ arg1="SSA variable with_mul, l:695 -> ControlFlowNode for self"
690690
OK()
691691
return self
692692

@@ -700,8 +700,8 @@ def test_mul():
700700
# object.__matmul__(self, other)
701701
class With_matmul:
702702
def __matmul__(self, other):
703-
SINK2(other)
704-
SINK1(self)
703+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:712 -> ControlFlowNode for other"
704+
SINK1(self) #$ arg1="SSA variable with_matmul, l:710 -> ControlFlowNode for self"
705705
OK()
706706
return self
707707

@@ -715,8 +715,8 @@ def test_matmul():
715715
# object.__truediv__(self, other)
716716
class With_truediv:
717717
def __truediv__(self, other):
718-
SINK2(other)
719-
SINK1(self)
718+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:727 -> ControlFlowNode for other"
719+
SINK1(self) #$ arg1="SSA variable with_truediv, l:725 -> ControlFlowNode for self"
720720
OK()
721721
return self
722722

@@ -730,8 +730,8 @@ def test_truediv():
730730
# object.__floordiv__(self, other)
731731
class With_floordiv:
732732
def __floordiv__(self, other):
733-
SINK2(other)
734-
SINK1(self)
733+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:742 -> ControlFlowNode for other"
734+
SINK1(self) #$ arg1="SSA variable with_floordiv, l:740 -> ControlFlowNode for self"
735735
OK()
736736
return self
737737

@@ -745,8 +745,8 @@ def test_floordiv():
745745
# object.__mod__(self, other)
746746
class With_mod:
747747
def __mod__(self, other):
748-
SINK2(other)
749-
SINK1(self)
748+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:757 -> ControlFlowNode for other"
749+
SINK1(self) #$ arg1="SSA variable with_mod, l:755 -> ControlFlowNode for self"
750750
OK()
751751
return self
752752

@@ -775,8 +775,8 @@ def test_divmod():
775775
# object.__pow__(self, other[, modulo])
776776
class With_pow:
777777
def __pow__(self, other):
778-
SINK2(other)
779-
SINK1(self)
778+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:793 -> ControlFlowNode for other"
779+
SINK1(self) #$ arg1="SSA variable with_pow, l:791 -> ControlFlowNode for self"
780780
OK()
781781
return self
782782

@@ -796,8 +796,8 @@ def test_pow_op():
796796
# object.__lshift__(self, other)
797797
class With_lshift:
798798
def __lshift__(self, other):
799-
SINK2(other)
800-
SINK1(self)
799+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:808 -> ControlFlowNode for other"
800+
SINK1(self) #$ arg1="SSA variable with_lshift, l:806 -> ControlFlowNode for self"
801801
OK()
802802
return self
803803

@@ -811,8 +811,8 @@ def test_lshift():
811811
# object.__rshift__(self, other)
812812
class With_rshift:
813813
def __rshift__(self, other):
814-
SINK2(other)
815-
SINK1(self)
814+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:823 -> ControlFlowNode for other"
815+
SINK1(self) #$ arg1="SSA variable with_rshift, l:821 -> ControlFlowNode for self"
816816
OK()
817817
return self
818818

@@ -826,8 +826,8 @@ def test_rshift():
826826
# object.__and__(self, other)
827827
class With_and:
828828
def __and__(self, other):
829-
SINK2(other)
830-
SINK1(self)
829+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:838 -> ControlFlowNode for other"
830+
SINK1(self) #$ arg1="SSA variable with_and, l:836 -> ControlFlowNode for self"
831831
OK()
832832
return self
833833

@@ -841,8 +841,8 @@ def test_and():
841841
# object.__xor__(self, other)
842842
class With_xor:
843843
def __xor__(self, other):
844-
SINK2(other)
845-
SINK1(self)
844+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:853 -> ControlFlowNode for other"
845+
SINK1(self) #$ arg1="SSA variable with_xor, l:851 -> ControlFlowNode for self"
846846
OK()
847847
return self
848848

@@ -856,8 +856,8 @@ def test_xor():
856856
# object.__or__(self, other)
857857
class With_or:
858858
def __or__(self, other):
859-
SINK2(other)
860-
SINK1(self)
859+
SINK2(other) #$ arg2="ControlFlowNode for arg2, l:868 -> ControlFlowNode for other"
860+
SINK1(self) #$ arg1="SSA variable with_or, l:866 -> ControlFlowNode for self"
861861
OK()
862862
return self
863863

0 commit comments

Comments
 (0)