Skip to content

Commit 9a4709c

Browse files
committed
Python: API graph tests: Disallow results outside project
Running the tests locally would result in thousands of results before this 😱
1 parent 0292ca6 commit 9a4709c

File tree

1 file changed

+2
-1
lines changed
  • python/ql/test/experimental/dataflow/ApiGraphs

1 file changed

+2
-1
lines changed

python/ql/test/experimental/dataflow/ApiGraphs/use.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class ApiUseTest extends InlineExpectationsTest {
1313
l = n.getLocation() and
1414
// Module variable nodes have no suitable location, so it's best to simply exclude them entirely
1515
// from the inline tests.
16-
not n instanceof DataFlow::ModuleVariableNode
16+
not n instanceof DataFlow::ModuleVariableNode and
17+
exists(l.getFile().getRelativePath())
1718
}
1819

1920
override predicate hasActualResult(Location location, string element, string tag, string value) {

0 commit comments

Comments
 (0)