mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added tests for PY-2481, PY-2482
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
class A:
|
||||
x = 3
|
||||
a = A()
|
||||
<warning descr="Assignment can be replaced with augmented assignment">a.x = a.x +<caret> 1</warning>
|
||||
@@ -0,0 +1,4 @@
|
||||
class A:
|
||||
x = 3
|
||||
a = A()
|
||||
a.x += 1
|
||||
@@ -10,4 +10,6 @@ var_4 = 1
|
||||
var_5 = var_5 + "string"
|
||||
var_6 = var_6 + var_4
|
||||
|
||||
var_7 += 2
|
||||
var_7 += 2
|
||||
|
||||
<warning descr="Assignment can be replaced with augmented assignment">var = 2 + var</warning> # PY-2482
|
||||
@@ -179,6 +179,11 @@ public class PyQuickFixTest extends PyLightFixtureTestCase {
|
||||
PyBundle.message("QFIX.augment.assignment"), true, true);
|
||||
}
|
||||
|
||||
public void testAugmentAssignmentWithContext() { // PY-2481
|
||||
doInspectionTest("AugmentAssignmentWithContext.py", PyAugmentAssignmentInspection.class,
|
||||
PyBundle.message("QFIX.augment.assignment"), true, true);
|
||||
}
|
||||
|
||||
public void testChainedComparisons() { // PY-1020
|
||||
doInspectionTest("ChainedComparisons.py", PyChainedComparisonsInspection.class,
|
||||
PyBundle.message("QFIX.chained.comparison"), true, true);
|
||||
|
||||
Reference in New Issue
Block a user