mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Rename PyTestCase#getPythonCodeStyle to PyTest#getPythonoCodeStyleSettings
This commit is contained in:
@@ -244,7 +244,7 @@ public class PyFormatterTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testSpaceWithinBraces() { // PY-8069
|
||||
getPythonCodeStyle().SPACE_WITHIN_BRACES = true;
|
||||
getPythonCodeStyleSettings().SPACE_WITHIN_BRACES = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ public class PyFormatterTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testIndentInComprehensions() { // PY-8516
|
||||
getPythonCodeStyle().ALIGN_COLLECTIONS_AND_COMPREHENSIONS = false;
|
||||
getPythonCodeStyleSettings().ALIGN_COLLECTIONS_AND_COMPREHENSIONS = false;
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -336,12 +336,12 @@ public class PyFormatterTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testSpaceBeforeBackslash() {
|
||||
getPythonCodeStyle().SPACE_BEFORE_BACKSLASH = false;
|
||||
getPythonCodeStyleSettings().SPACE_BEFORE_BACKSLASH = false;
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNewLineAfterColon() {
|
||||
getPythonCodeStyle().NEW_LINE_AFTER_COLON = true;
|
||||
getPythonCodeStyleSettings().NEW_LINE_AFTER_COLON = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -584,32 +584,32 @@ public class PyFormatterTest extends PyTestCase {
|
||||
|
||||
// PY-14962
|
||||
public void testAlignDictLiteralOnValue() {
|
||||
getPythonCodeStyle().DICT_ALIGNMENT = PyCodeStyleSettings.DICT_ALIGNMENT_ON_VALUE;
|
||||
getPythonCodeStyleSettings().DICT_ALIGNMENT = PyCodeStyleSettings.DICT_ALIGNMENT_ON_VALUE;
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-14962
|
||||
public void testAlignDictLiteralOnColon() {
|
||||
getPythonCodeStyle().DICT_ALIGNMENT = PyCodeStyleSettings.DICT_ALIGNMENT_ON_COLON;
|
||||
getPythonCodeStyleSettings().DICT_ALIGNMENT = PyCodeStyleSettings.DICT_ALIGNMENT_ON_COLON;
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-14962
|
||||
public void testDictWrappingChopDownIfLong() {
|
||||
getCodeStyleSettings().setRightMargin(PythonLanguage.getInstance(), 80);
|
||||
getPythonCodeStyle().DICT_WRAPPING = WrapType.CHOP_DOWN_IF_LONG.getLegacyRepresentation();
|
||||
getPythonCodeStyleSettings().DICT_WRAPPING = WrapType.CHOP_DOWN_IF_LONG.getLegacyRepresentation();
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-14962
|
||||
public void testForceNewLineAfterLeftBraceInDict() {
|
||||
getPythonCodeStyle().DICT_NEW_LINE_AFTER_LEFT_BRACE = true;
|
||||
getPythonCodeStyleSettings().DICT_NEW_LINE_AFTER_LEFT_BRACE = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
// PY-14962
|
||||
public void testForceNewLineBeforeRightBraceInDict() {
|
||||
getPythonCodeStyle().DICT_NEW_LINE_BEFORE_RIGHT_BRACE = true;
|
||||
getPythonCodeStyleSettings().DICT_NEW_LINE_BEFORE_RIGHT_BRACE = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ public class PyFormatterTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testDoNotDestroyAlignment_OnPostponedFormatting() throws Exception {
|
||||
getPythonCodeStyle().DICT_ALIGNMENT = PyCodeStyleSettings.DICT_ALIGNMENT_ON_COLON;
|
||||
getPythonCodeStyleSettings().DICT_ALIGNMENT = PyCodeStyleSettings.DICT_ALIGNMENT_ON_COLON;
|
||||
doTest();
|
||||
}
|
||||
|
||||
|
||||
@@ -773,7 +773,7 @@ public class PythonCompletionTest extends PyTestCase {
|
||||
|
||||
// PY-15197
|
||||
public void testKeywordArgumentEqualsSignSurroundedWithSpaces() {
|
||||
getPythonCodeStyle().SPACE_AROUND_EQ_IN_KEYWORD_ARGUMENT = true;
|
||||
getPythonCodeStyleSettings().SPACE_AROUND_EQ_IN_KEYWORD_ARGUMENT = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ public abstract class PyTestCase extends UsefulTestCase {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected PyCodeStyleSettings getPythonCodeStyle() {
|
||||
protected PyCodeStyleSettings getPythonCodeStyleSettings() {
|
||||
return getCodeStyleSettings().getCustomSettings(PyCodeStyleSettings.class);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user