Python: API graph tests: Disallow results outside project

Running the tests locally would result in thousands of results before
this 😱
This commit is contained in:
Rasmus Wriedt Larsen
2021-05-21 15:57:10 +02:00
parent 0292ca6b67
commit 9a4709c134

View File

@@ -13,7 +13,8 @@ class ApiUseTest extends InlineExpectationsTest {
l = n.getLocation() and
// Module variable nodes have no suitable location, so it's best to simply exclude them entirely
// from the inline tests.
not n instanceof DataFlow::ModuleVariableNode
not n instanceof DataFlow::ModuleVariableNode and
exists(l.getFile().getRelativePath())
}
override predicate hasActualResult(Location location, string element, string tag, string value) {