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

Skip to content

Commit 387ab52

Browse files
committed
Python: Add zope web tests from internal repo
1 parent d293418 commit 387ab52

4 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
| 12 | ControlFlowNode for implementer | class implementer | resources/lib/python/lib/zope/interface/declarations.py:352 |
2+
| 13 | ControlFlowNode for IThing | class IThing | test.py:4 |
3+
| 14 | ControlFlowNode for Thing | class Thing | test.py:9 |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import python
2+
import semmle.python.TestUtils
3+
4+
from ControlFlowNode f, Object o, ControlFlowNode x
5+
where
6+
exists(ExprStmt s | s.getValue().getAFlowNode() = f) and
7+
f.refersTo(o, x) and
8+
f.getLocation().getFile().getBaseName() = "test.py"
9+
select f.getLocation().getStartLine(), f.toString(), o.toString(),
10+
remove_library_prefix(x.getLocation())
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
semmle-extractor-options: --max-import-depth=3 -p ../../../../resources/lib/python/lib/ --respect-init=False
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
from zope.interface import Interface, implementer
3+
4+
class IThing(Interface):
5+
pass
6+
7+
8+
@implementer(IThing)
9+
class Thing(object):
10+
pass
11+
12+
implementer
13+
IThing
14+
Thing

0 commit comments

Comments
 (0)