Python: Consistenly use TestScope instead of Test

It's not clear which one is the correct to use, but there were more uses of
TestScope than Test, so I'm assuming that is the right one ¯\_(ツ)_/¯
This commit is contained in:
Rasmus Wriedt Larsen
2020-04-07 11:42:13 +02:00
parent 2871eb307a
commit 46ecbef8f2

View File

@@ -17,7 +17,7 @@ import semmle.python.filters.Tests
from Assert a, string value
where
/* Exclude asserts inside test cases */
not a.getScope() instanceof Test and
not a.getScope().getScope*() instanceof TestScope and
exists(Expr test | test = a.getTest() |
value = test.(IntegerLiteral).getN()
or