mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user