File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
lib/semmle/python/frameworks
test/library-tests/frameworks/lxml Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -70,4 +70,19 @@ private module Lxml {
70
70
71
71
override string getName ( ) { result = "lxml.etree" }
72
72
}
73
+
74
+ class XPathEvaluatorCall extends XPathExecution:: Range , DataFlow:: CallCfgNode {
75
+ XPathEvaluatorCall ( ) {
76
+ this =
77
+ API:: moduleImport ( "lxml" )
78
+ .getMember ( "etree" )
79
+ .getMember ( "XPathEvaluator" )
80
+ .getReturn ( )
81
+ .getACall ( )
82
+ }
83
+
84
+ override DataFlow:: Node getXPath ( ) { result = this .getArg ( 0 ) }
85
+
86
+ override string getName ( ) { result = "lxml.etree" }
87
+ }
73
88
}
Original file line number Diff line number Diff line change @@ -18,4 +18,4 @@ def test_ETXpath_class():
18
18
def test_XPathEvaluator_class ():
19
19
root = etree .XML ("<root><a>TEXT</a></root>" )
20
20
search_root = etree .XPathEvaluator (root )
21
- text = search_root ("path" )[0 ] # $ MISSING: getXPath="path"
21
+ text = search_root ("path" )[0 ] # $ getXPath="path"
You can’t perform that action at this time.
0 commit comments