Python: Add zope web tests from internal repo

This commit is contained in:
Rasmus Wriedt Larsen
2019-12-02 14:38:03 +01:00
parent d293418672
commit 387ab52855
4 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
| 12 | ControlFlowNode for implementer | class implementer | resources/lib/python/lib/zope/interface/declarations.py:352 |
| 13 | ControlFlowNode for IThing | class IThing | test.py:4 |
| 14 | ControlFlowNode for Thing | class Thing | test.py:9 |

View File

@@ -0,0 +1,10 @@
import python
import semmle.python.TestUtils
from ControlFlowNode f, Object o, ControlFlowNode x
where
exists(ExprStmt s | s.getValue().getAFlowNode() = f) and
f.refersTo(o, x) and
f.getLocation().getFile().getBaseName() = "test.py"
select f.getLocation().getStartLine(), f.toString(), o.toString(),
remove_library_prefix(x.getLocation())

View File

@@ -0,0 +1 @@
semmle-extractor-options: --max-import-depth=3 -p ../../../../resources/lib/python/lib/ --respect-init=False

View File

@@ -0,0 +1,14 @@
from zope.interface import Interface, implementer
class IThing(Interface):
pass
@implementer(IThing)
class Thing(object):
pass
implementer
IThing
Thing