PY-18525 Don't include Python 2.7 and the latest Python 3 version in compatibility inspection in tests

This commit is contained in:
Mikhail Golubev
2016-03-03 14:52:13 +03:00
parent f62b11ea9f
commit c56c75bcb2
@@ -64,12 +64,15 @@ public class PyCompatibilityInspection extends PyInspection {
public static final List<LanguageLevel> DEFAULT_PYTHON_VERSIONS = ImmutableList.of(LanguageLevel.PYTHON27, LanguageLevel.getLatest());
// Legacy DefaultJDOMExternalizer requires public fields for proper serialization
public JDOMExternalizableStringList ourVersions = new JDOMExternalizableStringList(ContainerUtil.map(DEFAULT_PYTHON_VERSIONS, LanguageLevel::toString));
public JDOMExternalizableStringList ourVersions = new JDOMExternalizableStringList();
public PyCompatibilityInspection () {
if (ApplicationManager.getApplication().isUnitTestMode()) {
ourVersions.addAll(UnsupportedFeaturesUtil.ALL_LANGUAGE_LEVELS);
}
else {
ourVersions.addAll(ContainerUtil.map(DEFAULT_PYTHON_VERSIONS, LanguageLevel::toString));
}
}
@Nullable