mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-20 20:20:56 +07:00
support new literal types in Python 2.6 (PY-317)
This commit is contained in:
@@ -6,6 +6,8 @@ import com.intellij.openapi.editor.colors.TextAttributesKey;
|
||||
import com.intellij.openapi.editor.markup.EffectType;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
import com.jetbrains.python.fixtures.PyLightFixtureTestCase;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.impl.PythonLanguageLevelPusher;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -90,6 +92,18 @@ public class PythonHighlightingTest extends PyLightFixtureTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testStringBytesLiteralOK() throws Exception {
|
||||
PythonLanguageLevelPusher.FORCE_LANGUAGE_LEVEL = LanguageLevel.PYTHON26;
|
||||
PythonLanguageLevelPusher.pushLanguageLevel(myFixture.getProject());
|
||||
try {
|
||||
doTest();
|
||||
}
|
||||
finally {
|
||||
PythonLanguageLevelPusher.FORCE_LANGUAGE_LEVEL = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void testMalformedStringTripleQuoteUnterminated() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user