We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2871eb3 commit 46ecbefCopy full SHA for 46ecbef
python/ql/src/Statements/AssertLiteralConstant.ql
@@ -17,7 +17,7 @@ import semmle.python.filters.Tests
17
from Assert a, string value
18
where
19
/* Exclude asserts inside test cases */
20
- not a.getScope() instanceof Test and
+ not a.getScope().getScope*() instanceof TestScope and
21
exists(Expr test | test = a.getTest() |
22
value = test.(IntegerLiteral).getN()
23
or
0 commit comments