FileMetrics { public int cognitiveComplexity() { return cognitiveComplexityVisitor.getComplexity(); } FileMetrics(PythonVisitorContext context); int numberOfStatements(); int numberOfFunctions(); int numberOfClasses(); int complexity(); int cognitiveComplexity(); List<Integer> functionComplexities(); FileLinesVisitor fileLinesVisitor();  }
@Test public void cognitive_complexity() { assertThat(metrics("classes.py").cognitiveComplexity()).isEqualTo(0); assertThat(metrics("cognitive-complexities.py").cognitiveComplexity()).isEqualTo(91); }