void () { runWithLanguageLevel(LanguageLevel.PYTHON27, () -> { myFixture.configureByFile("typeParser/typeParser.py"); final PyType type = PyTypeParser.getTypeByName(myFixture.getFile(), "T <= str or unicode"); assertNotNull(type); assertInstanceOf(type, PyTypeVarType.class); final PyTypeVarType genericType = (PyTypeVarType)type; final PyType bound = genericType.getBound(); assertInstanceOf(bound, PyUnionType.class); }); }