Skip to content

Commit 3f49aee

Browse files
committed
Python: Descriptor tests fixup (1/3)
1 parent 13568b7 commit 3f49aee

3 files changed

Lines changed: 9 additions & 12 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
| 16 | classmethod() | 17 | Function c1 |
2-
| 23 | classmethod() | 20 | Function c2 |
3-
| 24 | classmethod() | 20 | Function c2 |
4-
| 26 | staticmethod() | 27 | Function s1 |
5-
| 33 | staticmethod() | 30 | Function s2 |
6-
| 34 | staticmethod() | 30 | Function s2 |
1+
| 13 | classmethod() | 14 | Function c1 |
2+
| 20 | classmethod() | 17 | Function c2 |
3+
| 21 | classmethod() | 17 | Function c2 |
4+
| 23 | staticmethod() | 24 | Function s1 |
5+
| 30 | staticmethod() | 27 | Function s2 |
6+
| 31 | staticmethod() | 27 | Function s2 |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| 6 | Property f | 7 | Function f | 11 | Function f |
1+
| 3 | Property f | 4 | Function f | 8 | Function f |

python/ql/test/library-tests/descriptors/test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
2-
3-
41
class C(object):
52

63
@property
74
def f(self):
85
return self._f
96

107
@f.setter
11-
def f(self):
12-
return self._f
8+
def f(self, value):
9+
self._f = value
1310

1411
class D(object):
1512

0 commit comments

Comments
 (0)