mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Reset token set provider in tests where contributors are registered manually
It should also fix constant blinking of the test PyFunctionTypeAnnotationParsingTest.testNoReturnType.
This commit is contained in:
@@ -42,6 +42,7 @@ public class PyFunctionTypeAnnotationParsingTest extends ParsingTestCase {
|
||||
registerExtensionPoint(PythonDialectsTokenSetContributor.EP_NAME, PythonDialectsTokenSetContributor.class);
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor());
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PyDocstringTokenSetContributor());
|
||||
PythonDialectsTokenSetProvider.reset();
|
||||
}
|
||||
|
||||
protected void doCodeTest(@NotNull String typeAnnotation) {
|
||||
|
||||
@@ -40,6 +40,7 @@ public class PythonConsoleParsingTest extends ParsingTestCase {
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor());
|
||||
PythonDialectsTokenSetProvider.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,6 +41,7 @@ public class PythonParsingTest extends ParsingTestCase {
|
||||
super.setUp();
|
||||
registerExtensionPoint(PythonDialectsTokenSetContributor.EP_NAME, PythonDialectsTokenSetContributor.class);
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor());
|
||||
PythonDialectsTokenSetProvider.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,9 +17,7 @@ package com.jetbrains.python.pyi;
|
||||
|
||||
import com.intellij.testFramework.ParsingTestCase;
|
||||
import com.intellij.testFramework.TestDataPath;
|
||||
import com.jetbrains.python.PythonDialectsTokenSetContributor;
|
||||
import com.jetbrains.python.PythonTestUtil;
|
||||
import com.jetbrains.python.PythonTokenSetContributor;
|
||||
import com.jetbrains.python.*;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
|
||||
/**
|
||||
@@ -36,6 +34,7 @@ public class PyiParsingTest extends ParsingTestCase {
|
||||
super.setUp();
|
||||
registerExtensionPoint(PythonDialectsTokenSetContributor.EP_NAME, PythonDialectsTokenSetContributor.class);
|
||||
registerExtension(PythonDialectsTokenSetContributor.EP_NAME, new PythonTokenSetContributor());
|
||||
PythonDialectsTokenSetProvider.reset();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user