use of com.jetbrains.python.sdk.flavors.PythonSdkFlavor in project intellij-community by JetBrains.
the class PySdkFlavorTest method testPyPy323VersionString.
public void testPyPy323VersionString() {
final PythonSdkFlavor flavor = PyPySdkFlavor.INSTANCE;
final String versionOutput = "Python 3.2.5 (986752d005bb6c65ce418113e4c3cd115f61a9b4, Jun 23 2014, 00:23:34)\n" + "[PyPy 2.3.1 with GCC 4.8.2]\n";
final Sdk mockSdk = createMockSdk(flavor, versionOutput);
assertEquals("PyPy 2.3.1 [Python 3.2.5]", mockSdk.getVersionString());
assertEquals(LanguageLevel.PYTHON32, flavor.getLanguageLevel(mockSdk));
assertEquals("builtins.py", PythonSdkType.getBuiltinsFileName(mockSdk));
}
use of com.jetbrains.python.sdk.flavors.PythonSdkFlavor in project intellij-community by JetBrains.
the class PySdkFlavorTest method testPython27VersionString.
public void testPython27VersionString() {
final PythonSdkFlavor flavor = UnixPythonSdkFlavor.INSTANCE;
final String versionOutput = "Python 2.7.6\n";
final Sdk mockSdk = createMockSdk(flavor, versionOutput);
assertEquals("Python 2.7.6", mockSdk.getVersionString());
assertEquals(LanguageLevel.PYTHON27, flavor.getLanguageLevel(mockSdk));
}
use of com.jetbrains.python.sdk.flavors.PythonSdkFlavor in project intellij-community by JetBrains.
the class PySdkFlavorTest method testPyPy23VersionString.
public void testPyPy23VersionString() {
final PythonSdkFlavor flavor = PyPySdkFlavor.INSTANCE;
final String versionOutput = "Python 2.7.6 (32f35069a16d819b58c1b6efb17c44e3e53397b2, Jun 10 2014, 00:42:27)\n" + "[PyPy 2.3.1 with GCC 4.8.2]\n";
final Sdk mockSdk = createMockSdk(flavor, versionOutput);
assertEquals("PyPy 2.3.1 [Python 2.7.6]", mockSdk.getVersionString());
assertEquals(LanguageLevel.PYTHON27, flavor.getLanguageLevel(mockSdk));
assertEquals("__builtin__.py", PythonSdkType.getBuiltinsFileName(mockSdk));
}
use of com.jetbrains.python.sdk.flavors.PythonSdkFlavor in project intellij-community by JetBrains.
the class PySdkFlavorTest method testJython25VersionString.
public void testJython25VersionString() {
final PythonSdkFlavor flavor = JythonSdkFlavor.INSTANCE;
final String versionOutput = "Jython 2.5.3\n";
final Sdk mockSdk = createMockSdk(flavor, versionOutput);
assertEquals("Jython 2.5.3", mockSdk.getVersionString());
assertEquals(LanguageLevel.PYTHON25, flavor.getLanguageLevel(mockSdk));
}
use of com.jetbrains.python.sdk.flavors.PythonSdkFlavor in project intellij-community by JetBrains.
the class PySdkFlavorTest method testPython34VersionString.
public void testPython34VersionString() {
final PythonSdkFlavor flavor = UnixPythonSdkFlavor.INSTANCE;
final String versionOutput = "Python 3.4.0\n";
final Sdk mockSdk = createMockSdk(flavor, versionOutput);
assertEquals("Python 3.4.0", mockSdk.getVersionString());
assertEquals(LanguageLevel.PYTHON34, flavor.getLanguageLevel(mockSdk));
}
Aggregations