diff --git a/python/testData/formatter/docCommentIgnored.py b/python/testData/formatter/docCommentIgnored.py new file mode 100644 index 000000000000..08a8959972a7 --- /dev/null +++ b/python/testData/formatter/docCommentIgnored.py @@ -0,0 +1,4 @@ +#: :type: dict of (str, C) +d = {'foo': C()} +#: :type: list of str +xs = ['bar'] \ No newline at end of file diff --git a/python/testData/formatter/docCommentIgnored_after.py b/python/testData/formatter/docCommentIgnored_after.py new file mode 100644 index 000000000000..08a8959972a7 --- /dev/null +++ b/python/testData/formatter/docCommentIgnored_after.py @@ -0,0 +1,4 @@ +#: :type: dict of (str, C) +d = {'foo': C()} +#: :type: list of str +xs = ['bar'] \ No newline at end of file diff --git a/python/testData/formatter/doubleHashCommentIgnored.py b/python/testData/formatter/doubleHashCommentIgnored.py new file mode 100644 index 000000000000..f1501b360660 --- /dev/null +++ b/python/testData/formatter/doubleHashCommentIgnored.py @@ -0,0 +1,6 @@ +########### +## +## MANUAL +## + +print('Spam') \ No newline at end of file diff --git a/python/testData/formatter/doubleHashCommentIgnored_after.py b/python/testData/formatter/doubleHashCommentIgnored_after.py new file mode 100644 index 000000000000..f1501b360660 --- /dev/null +++ b/python/testData/formatter/doubleHashCommentIgnored_after.py @@ -0,0 +1,6 @@ +########### +## +## MANUAL +## + +print('Spam') \ No newline at end of file diff --git a/python/testData/formatter/shebang.py b/python/testData/formatter/shebangCommentIgnored.py similarity index 100% rename from python/testData/formatter/shebang.py rename to python/testData/formatter/shebangCommentIgnored.py diff --git a/python/testData/formatter/shebang_after.py b/python/testData/formatter/shebangCommentIgnored_after.py similarity index 100% rename from python/testData/formatter/shebang_after.py rename to python/testData/formatter/shebangCommentIgnored_after.py diff --git a/python/testSrc/com/jetbrains/python/PyFormatterTest.java b/python/testSrc/com/jetbrains/python/PyFormatterTest.java index 9933085dbdd7..4a5f55e0b35b 100644 --- a/python/testSrc/com/jetbrains/python/PyFormatterTest.java +++ b/python/testSrc/com/jetbrains/python/PyFormatterTest.java @@ -401,10 +401,6 @@ public class PyFormatterTest extends PyTestCase { doTest(); } - public void testShebang() { //PY-12775 - doTest(); - } - public void testParenthesisAroundGeneratorExpression() { doTest(); } @@ -505,6 +501,21 @@ public class PyFormatterTest extends PyTestCase { doTest(); } + // PY-12938 + public void testDoubleHashCommentIgnored() { + doTest(); + } + + // PY-12938 + public void testDocCommentIgnored() { + doTest(); + } + + // PY-12775 + public void testShebangCommentIgnored() { + doTest(); + } + /** * This test merely checks that call to {@link com.intellij.psi.codeStyle.CodeStyleManager#reformat(com.intellij.psi.PsiElement)} * is possible for Python sources.