mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-84289 Compute getStringBasedType with doPreventingRecursion to avoid repeating calculations
GitOrigin-RevId: a548f05bea971f6b3e3acdb1f1bc7898d3411d5e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2c1299f1c6
commit
61b55f5a71
@@ -3156,6 +3156,19 @@ public class PyTypeHintsInspectionTest extends PyInspectionTestCase {
|
||||
doMultiFileTest();
|
||||
}
|
||||
|
||||
|
||||
// PY-84289
|
||||
public void testExponentialAnalysisTimeWhenMapLookupKeyEqualsVariableName() {
|
||||
long before = System.currentTimeMillis();
|
||||
doMultiFileTest("main.py");
|
||||
long after = System.currentTimeMillis();
|
||||
long diff = after - before;
|
||||
// junit3 doesn't support timeouts out of the box
|
||||
if (diff > 5000) {
|
||||
fail("Took too long to analyze main.py: " + diff + " ms");
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected Class<? extends PyInspection> getInspectionClass() {
|
||||
|
||||
Reference in New Issue
Block a user