diff --git a/python/python.iml b/python/python.iml index 5fcfae68757a..0930880b0258 100644 --- a/python/python.iml +++ b/python/python.iml @@ -12,6 +12,7 @@ + diff --git a/python/testData/highlighting/continueInFinallyBlock.py b/python/testData/highlighting/continueInFinallyBlock.py new file mode 100644 index 000000000000..586fe87155d8 --- /dev/null +++ b/python/testData/highlighting/continueInFinallyBlock.py @@ -0,0 +1,5 @@ +while True: + try: + x + finally: + continue \ No newline at end of file diff --git a/python/testData/highlighting/returnOutsideOfFunction.py b/python/testData/highlighting/returnOutsideOfFunction.py new file mode 100644 index 000000000000..9f411a2e1b3a --- /dev/null +++ b/python/testData/highlighting/returnOutsideOfFunction.py @@ -0,0 +1 @@ +return 1 \ No newline at end of file diff --git a/python/testData/psi/TryFinally.py b/python/testData/psi/TryFinally.py new file mode 100644 index 000000000000..2aba20162c34 --- /dev/null +++ b/python/testData/psi/TryFinally.py @@ -0,0 +1,4 @@ +try: + x +finally: + z \ No newline at end of file diff --git a/python/testData/psi/TryFinally.txt b/python/testData/psi/TryFinally.txt new file mode 100644 index 000000000000..10f8a2d61aee --- /dev/null +++ b/python/testData/psi/TryFinally.txt @@ -0,0 +1,17 @@ +PyFile:TryFinally.py + PyTryExceptStatement + PsiElement(Py:TRY_KEYWORD)('try') + PsiElement(Py:COLON)(':') + PsiWhiteSpace('\n ') + PyStatementList + PyExpressionStatement + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') + PsiWhiteSpace('\n') + PsiElement(Py:FINALLY_KEYWORD)('finally') + PsiElement(Py:COLON)(':') + PsiWhiteSpace('\n ') + PyStatementList + PyExpressionStatement + PyReferenceExpression: z + PsiElement(Py:IDENTIFIER)('z') \ No newline at end of file