Fix test data and code style settings in tests after recent changes in formatter core

This commit is contained in:
Mikhail Golubev
2015-07-15 16:05:10 +03:00
parent 4e49cc5a37
commit 150a577535
9 changed files with 19 additions and 7 deletions

View File

@@ -1,3 +1,3 @@
s = ("string \n"
"next line"
)
)

View File

@@ -1,4 +1,4 @@
t = ("string\n"
"some\n"
"other\n"
"lines\n", )
"lines\n",)

View File

@@ -2,4 +2,4 @@ def foo():
return bbb
aaa = foo() && ccc
aaa = foo() and ccc

View File

@@ -1 +1 @@
aaa = <selection>bbb</selection> && ccc
aaa = <selection>bbb</selection> and ccc

View File

@@ -7,6 +7,6 @@ class SolverEquation:
b = 25
c = 46
self.a = math.sqrt(b ** 2 - 4 * a * c)
root1 = (-b + self.a) / (2*a)
root2 = (-b - self.a) / (2*a)
root1 = (-b + self.a) / (2 * a)
root2 = (-b - self.a) / (2 * a)
print(root1,root2)

View File

@@ -1,3 +1,3 @@
a = '/import/' + urllib.quote(projectId) + '/issues?' + urllib.urlencode({'assigneeGroup': assigneeGroup})
response = self._reqXml('PUT', a,
xml, 400).toxml().encode('utf-8')
xml, 400).toxml().encode('utf-8')

View File

@@ -322,11 +322,13 @@ public class PyQuickFixTest extends PyTestCase {
// PY-1445
public void testConvertSingleQuotedDocstring() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doInspectionTest(PySingleQuotedDocstringInspection.class, PyBundle.message("QFIX.convert.single.quoted.docstring"), true, true);
}
// PY-8926
public void testConvertSingleQuotedDocstringEscape() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doInspectionTest(PySingleQuotedDocstringInspection.class, PyBundle.message("QFIX.convert.single.quoted.docstring"), true, true);
}
@@ -425,6 +427,7 @@ public class PyQuickFixTest extends PyTestCase {
// PY-3394
public void testDocstringParams() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(myFixture.getModule());
documentationSettings.setFormat(DocStringFormat.EPYTEXT);
try {
@@ -437,6 +440,7 @@ public class PyQuickFixTest extends PyTestCase {
}
public void testDocstringParams1() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(myFixture.getModule());
documentationSettings.setFormat(DocStringFormat.EPYTEXT);
try {

View File

@@ -212,6 +212,7 @@ public class PyIntentionTest extends PyTestCase {
}
public void testMultilineQuotedString() { //PY-8064
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doTest(PyBundle.message("INTN.quoted.string.double.to.single"));
}
@@ -284,6 +285,7 @@ public class PyIntentionTest extends PyTestCase {
}
public void testTypeInDocstring() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doDocReferenceTest();
}
@@ -300,6 +302,7 @@ public class PyIntentionTest extends PyTestCase {
}
public void testTypeInDocstring5() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doDocReferenceTest();
}
@@ -320,10 +323,12 @@ public class PyIntentionTest extends PyTestCase {
}
public void testTypeInDocstring1() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doDocReturnTypeTest();
}
public void testTypeInDocstring2() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doDocReturnTypeTest();
}
@@ -394,6 +399,7 @@ public class PyIntentionTest extends PyTestCase {
}
public void testDocStubKeywordOnly() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doDocStubTest(LanguageLevel.PYTHON32);
}

View File

@@ -93,6 +93,7 @@ public class PyChangeSignatureTest extends PyTestCase {
}
public void testUpdateDocstring() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
final PyParameterInfo a = new PyParameterInfo(0, "a", null, false);
final PyParameterInfo d1 = new PyParameterInfo(1, "d", "1", true);
d1.setName("d1");
@@ -100,6 +101,7 @@ public class PyChangeSignatureTest extends PyTestCase {
}
public void testFixDocstringRemove() {
getCommonCodeStyleSettings().getIndentOptions().INDENT_SIZE = 2;
doChangeSignatureTest(null, Arrays.asList(new PyParameterInfo(0, "a", null, false)));
}