@Test
public void testPythonFilesInTestapp() throws FileAnalysisException {

  final FileAnalyzer f1 =
      FileAnalyzerFactory.buildFileAnalyzer(
          new File("src/test/resources/testapp/foo/hello_world.py"));
  final Map<ConstructId, Construct> c1 = f1.getConstructs();
  assertEquals(2, c1.size()); // pack, module
  final FileAnalyzer f2 =
      FileAnalyzerFactory.buildFileAnalyzer(
          new File("src/test/resources/testapp/foo/func_hw.py"));
  final Map<ConstructId, Construct> c2 = f2.getConstructs();
  assertEquals(4, c2.size()); // pack, module, 2 functions
  final FileAnalyzer f3 =
      FileAnalyzerFactory.buildFileAnalyzer(
          new File("src/test/resources/testapp/foo/class_hw.py"));
  final Map<ConstructId, Construct> c3 = f3.getConstructs();
  assertEquals(12, c3.size()); // pack, module, 2 functions, 1 class, 1 constructor, 1 method
  // class_hw.py contains Python 2 syntax. This is to check whether the resp. method is still
  // added when using the Python 3 parser
  final PythonId pack = new PythonId(null, PythonId.Type.PACKAGE, "foo");
  final PythonId modu = new PythonId(pack, PythonId.Type.MODULE, "class_hw");
  final PythonId func = new PythonId(modu, PythonId.Type.FUNCTION, "func_with_class(arg)");
  final PythonId clas = new PythonId(func, PythonId.Type.CLASS, "class_in_func()");
  final PythonId meth =
      new PythonId(clas, PythonId.Type.METHOD, "method_of_class_in_func(self,something)");
  assertTrue(c3.containsKey(pack));
  assertTrue(c3.containsKey(modu));
  assertTrue(c3.containsKey(func));
  assertTrue(c3.containsKey(clas));
  assertTrue(c3.containsKey(meth));
}