mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 10:20:15 +07:00
PY-15605 Add test case for the issue, though it has been fixed in the platform already
This commit is contained in:
6
python/testData/reparse/SimilarDecorators.py
Normal file
6
python/testData/reparse/SimilarDecorators.py
Normal file
@@ -0,0 +1,6 @@
|
||||
@decorator('a')
|
||||
def foo():
|
||||
pass
|
||||
|
||||
@decorator('b')
|
||||
de<caret>
|
||||
28
python/testSrc/com/jetbrains/python/PythonReparseTest.java
Normal file
28
python/testSrc/com/jetbrains/python/PythonReparseTest.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.jetbrains.python;
|
||||
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.impl.DebugUtil;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
|
||||
/**
|
||||
* Analogous to CythonReparseTest.
|
||||
*
|
||||
* @author Mikhail Golubev
|
||||
*/
|
||||
public class PythonReparseTest extends PyTestCase {
|
||||
private void doTest(final String typedText) throws InterruptedException {
|
||||
final String testName = getTestName(false);
|
||||
myFixture.configureByFile("reparse/" + testName + ".py");
|
||||
myFixture.type(typedText);
|
||||
PsiDocumentManager.getInstance(myFixture.getProject()).commitAllDocuments();
|
||||
final String actualPsiText = DebugUtil.psiToString(myFixture.getFile(), false);
|
||||
myFixture.configureByText(testName + ".py", myFixture.getEditor().getDocument().getText());
|
||||
final String expectedPsiText = DebugUtil.psiToString(myFixture.getFile(), false);
|
||||
assertEquals(expectedPsiText, actualPsiText);
|
||||
}
|
||||
|
||||
// PY-15605
|
||||
public void testSimilarDecorators() throws InterruptedException {
|
||||
doTest("f");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user