Rename PyTestCase#getPythonCodeStyle to PyTest#getPythonoCodeStyleSettings

This commit is contained in:
Mikhail Golubev
2015-07-31 17:50:04 +03:00
parent 7d4bd2b487
commit a3154c84c6
3 changed files with 12 additions and 12 deletions
@@ -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);
}