Files
codeql/python/ql/test/library-tests/PointsTo/version/VersionTest.ql
2018-11-19 15:15:54 +00:00

10 lines
307 B
Plaintext

import python
import semmle.python.types.Version
from VersionTest vt, Location l, int v
where l = vt.getNode().getLocation() and
l.getFile().getName().matches("%test.py")
and (if vt.isTrue() then v = major_version() else v = 5-major_version())
select l.getStartLine(), vt.(ControlFlowNode).toString(), v