Add/update unit tests

This commit is contained in:
Joe Farebrother
2025-07-11 15:10:45 +01:00
parent 8fb9bdd0af
commit 083d258585
10 changed files with 208 additions and 8 deletions

View File

@@ -5,6 +5,8 @@ import semmle.python.ApiGraphs
/** Holds if `cls` has the `functools.total_ordering` decorator. */
predicate totalOrdering(Class cls) {
cls.getADecorator() =
API::moduleImport("functools").getMember("total_ordering").asSource().asExpr()
API::moduleImport("functools")
.getMember("total_ordering")
.asSource()
.flowsTo(DataFlow::exprNode(cls.getADecorator()))
}