diff --git a/python/testData/psi/WithStatement.py b/python/testData/psi/WithStatement.py new file mode 100644 index 000000000000..91978f7bcc1e --- /dev/null +++ b/python/testData/psi/WithStatement.py @@ -0,0 +1,3 @@ +from __future__ import with_statement +with x as y: + pass \ No newline at end of file diff --git a/python/testData/psi/WithStatement.txt b/python/testData/psi/WithStatement.txt new file mode 100644 index 000000000000..db22d47ba510 --- /dev/null +++ b/python/testData/psi/WithStatement.txt @@ -0,0 +1,28 @@ +PyFile:WithStatement.py + PyFromImportStatement + PsiElement(Py:FROM_KEYWORD)('from') + PsiWhiteSpace(' ') + PyReferenceExpression: __future__ + PsiElement(Py:IDENTIFIER)('__future__') + PsiWhiteSpace(' ') + PsiElement(Py:IMPORT_KEYWORD)('import') + PsiWhiteSpace(' ') + PyImportElement + PyReferenceExpression: with_statement + PsiElement(Py:IDENTIFIER)('with_statement') + PsiWhiteSpace('\n') + PyWithStatement + PsiElement(Py:WITH_KEYWORD)('with') + PsiWhiteSpace(' ') + PyReferenceExpression: x + PsiElement(Py:IDENTIFIER)('x') + PsiWhiteSpace(' ') + PsiElement(Py:AS_KEYWORD)('as') + PsiWhiteSpace(' ') + PyReferenceExpression: y + PsiElement(Py:IDENTIFIER)('y') + PsiElement(Py:COLON)(':') + PsiWhiteSpace('\n ') + PyStatementList + PyPassStatement + PsiElement(Py:PASS_KEYWORD)('pass') \ No newline at end of file