test fixed: (test loading protocol does not work in py < 2.7)
authorIlya.Kazakevich <Ilya.Kazakevich@jetbrains.com>
Mon, 14 Sep 2015 15:02:37 +0000 (18:02 +0300)
committerIlya.Kazakevich <Ilya.Kazakevich@jetbrains.com>
Mon, 14 Sep 2015 15:02:37 +0000 (18:02 +0300)
python/testSrc/com/jetbrains/env/python/testing/PythonUnitTestingTest.java

index a5a2475b698544a42366f85078f1f02ee397dcae..240de0e08c7d87f2d5cd032969fbdef02a0c2abb 100644 (file)
@@ -35,6 +35,12 @@ public final class PythonUnitTestingTest extends PyEnvTestCase {
    */
   public void testLoadProtocol() throws Exception {
     runPythonTest(new PyUnitTestProcessWithConsoleTestTask("/testRunner/env/unit", "test_load_protocol.py") {
+      @Override
+      public boolean isLanguageLevelSupported(@NotNull final LanguageLevel level) {
+        // "load_protocol" does not exist before 2.7
+        return level.compareTo(LanguageLevel.PYTHON26) > 0;
+      }
+
       @Override
       protected void checkTestResults(@NotNull final PyUnitTestProcessRunner runner,
                                       @NotNull final String stdout,