mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Add a test on skipping the comments before the source statement in Extract Method
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user