mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-21204 Quickfix "Create function" properly handles injected fragments
by inserting a new function in the containing host file, not inside the fragment itself. Also I fixed issues with keeping hard references to PSI elements and usage of deprecated TemplateBuilder's API.
This commit is contained in:
@@ -207,6 +207,18 @@ public class PyQuickFixTest extends PyTestCase {
|
||||
doInspectionTest(PyUnresolvedReferencesInspection.class, "Create class 'MyClass'", true, true);
|
||||
}
|
||||
|
||||
// PY-21204
|
||||
public void testAddClassFromFString() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON36,
|
||||
() -> doInspectionTest(PyUnresolvedReferencesInspection.class, "Create class 'MyClass'", true, true));
|
||||
}
|
||||
|
||||
// PY-21204
|
||||
public void testAddFunctionFromFString() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON36,
|
||||
() -> doInspectionTest(PyUnresolvedReferencesInspection.class, PyBundle.message("QFIX.NAME.unresolved.reference.create.function", "my_function"), true, true));
|
||||
}
|
||||
|
||||
// PY-1602
|
||||
public void testAddFunctionToModule() {
|
||||
doInspectionTest(
|
||||
|
||||
Reference in New Issue
Block a user