PY-17002 Suggest types inside unclosed parentheses in Google docstrings
[idea/community.git] / python / testSrc / com / jetbrains / python / PySectionBasedDocStringTest.java
index 9488be14829e04ad2d83cb7358b963c794d5c06d..166da2926731f52ad7b878d060568884a624de0f 100644 (file)
@@ -378,6 +378,16 @@ public class PySectionBasedDocStringTest extends PyTestCase {
                  "second line", firstExample.getDescription());
   }
 
                  "second line", firstExample.getDescription());
   }
 
+  // PY-17002
+  public void testGoogleNoClosingParenthesisAfterParamType() {
+    final GoogleCodeStyleDocString docString = findAndParseGoogleStyleDocString();
+    assertSize(1, docString.getSections());
+    final List<SectionField> params = docString.getSections().get(0).getFields();
+    assertSize(2, params);
+    assertEquals("Foo", params.get(0).getType());
+    assertEquals("Bar", params.get(1).getType());
+  }
+
   @Override
   protected String getTestDataPath() {
     return super.getTestDataPath() + "/docstrings";
   @Override
   protected String getTestDataPath() {
     return super.getTestDataPath() + "/docstrings";