Add a test on skipping the comments before the source statement in Extract Method

This commit is contained in:
Mikhail Golubev
2017-03-17 14:44:29 +03:00
parent 87d31be6c5
commit b4d3dabe10
3 changed files with 21 additions and 0 deletions
@@ -0,0 +1,10 @@
x = 42
# print('commented')
def func():
return x ** 2
# comment 1
# comment 2
print(func())
@@ -0,0 +1,7 @@
x = 42
# print('commented')
# comment 1
# comment 2
print(<selection>x ** 2</selection>)
@@ -286,4 +286,8 @@ public class PyExtractMethodTest extends LightMarkedTestCase {
public void testAwaitExpression() {
doTest("bar", LanguageLevel.PYTHON35);
}
public void testCommentsPrecedingSourceStatement() {
doTest("func");
}
}