Skip to content

Commit 46ecbef

Browse files
committed
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 ¯\_(ツ)_/¯
1 parent 2871eb3 commit 46ecbef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/src/Statements/AssertLiteralConstant.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import semmle.python.filters.Tests
1717
from Assert a, string value
1818
where
1919
/* Exclude asserts inside test cases */
20-
not a.getScope() instanceof Test and
20+
not a.getScope().getScope*() instanceof TestScope and
2121
exists(Expr test | test = a.getTest() |
2222
value = test.(IntegerLiteral).getN()
2323
or

0 commit comments

Comments
 (0)